Finding image url is valid or not in PHP
Thursday, June 17, 2010 4:01Posted in category PHP
No Comments
Here is the very useful function to find image url is valid or not in PHP
function is_valid_image_url($image_url)
{
$size = getimagesize($image_url);
if(!is_array($size))
{
return false;
}
return true;
}
The above function will return true, if the image url is valid otherwise false.
You can follow any responses to this entry through the RSS 2.0 feed.
You can skip to the end and leave a response. Pinging is currently not allowed.