Using this code with simplehtmldom script (http://simplehtmldom.sourceforge.net/manual.htm):
function file_get_html() {
$dom = new simple_html_dom;
$
Hi You need to check for the 404 Not Found message as there is returned an array in any case.
function url_exists($url){
if ((strpos($url, "http")) === false) $url = "http://" . $url;
$headers = @get_headers($url);
//print_r($headers);
if (is_array($headers)){
//Check for http error here....should add checks for other errors too...
if(strpos($headers[0], '404 Not Found'))
return false;
else
return true;
}
else
return false;
}