View Single Post
Old 08-31-07, 11:26 AM   #11
evilghost
Registered User
 
Join Date: Jul 2005
Posts: 3,606
Default Re: Detecting Bad Links

Quote:
Originally Posted by radekhulan
Create a simple table with URL, query time and its status. When query time is older than (e.g.) one week, try to get URL headers via http://us.php.net/manual/en/function.get-headers.php PHP get_headers() function, and see if it exists, ie. return "HTTP/1.1 200 OK" (or is 301 Moved Permanently - in this case your can auto change the link, 404 page not found, etc.). No need to query each link one million times a day via JavaScript, that would be a very silly approach...
He want's a client-side function to see if the client can access the page, not the webserver serving the content.
evilghost is offline   Reply With Quote