If a URL ends with just a string of characters, and no extension. i.e.:
http://example/1234567890
...and I know contains either a PNG, JPG or GIF. How do I find out which one it is without downloading the whole file. I'm asking because I need to do something completely different with it if it's a GIF.
Make a header request and look for the mime type as was posted here: