Hi, could someone tell me what's the concept of a link verifier? How does it determine if a site is responding?
Thanks.
2 methods off the top of my head, you could open the page locally and check trhat it does not contain a 404 error:
<? $page=file("http://www.yoursite.com/page.html"); $page=implode(" ",$page); if(!eregi("404",$page)){ echo "real"; } else { echo "not real"; } ?>
Thanks
You should also check it for the other misc. html error codes, 401, 500, 501, ect ect.
Heh, it turns out that I don't even have to do any regular expressions because function file() returns false if a file is not found, so all I had to do was:
$link = @file("http://dontexist.blah/abc.efg"); if (!$link) { // do whatever here }