Jump to content

Url pointing to image fle validation


EchoFool

Recommended Posts

Is there a way in php to check an url points to an image file ?

 

I'm tryin to get users to submit urls to images such as www.test.com/images/image.jpg

 

But if some one puts a link to lets say a html file or a movie file or audio file - i need php to decline it. I currently use file_exists for checking if the image exists but i need to prevent other types of urls first.

Link to comment
https://forums.phpfreaks.com/topic/187520-url-pointing-to-image-fle-validation/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.