If you want to get the file mime type for a remote file and you have its URL, the function below can be used.


If the remote file is a png image with a url of http://example.com/directory/image.png?ver=123, passing in that URL to this function would return image/png.

Leave a reply

Your email address will not be published. Required fields are marked *