Sunday, May 15, 2011

PHP function see if url exists

Here is an simple usefull function to check if an url exists

function url_exists($url)
{
$handle = @fopen($url, "r");
if ($handle === false)
return false;
fclose($handle);
return true;
}

No comments:

Post a Comment