Get filetype from url

http://www.google.cn/hellowrold.html
return "html"
http://hello.com/123.pdf
return "pdf"