I am trying to validate URLs and return false if such URLs happen to return gifs, like these:
However, I cannot use regex as no URL returns something that ends with ".gif".
I have no idea how to verify the format of a file that is returned from a URL, if the said file does not have an extension at the end... may anyone point me in the right direction?