Re: checking if URL's exist
| From: | Maxim Antonov | Date: | Wed, 09 Jul 2008 10:19:45 +0000 |
| Subject: | Re: checking if URL's exist | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-276494@lists.php.net to get a copy of this message | ||
You need
$s= fsockopen('host.com',80);
fwrite($s,"GET ".$URL." HTTP/1.1 \r\n");
fwrite($s,"Host: host.com \r\n\r\n");
and you must read first string - if url exists string begining with 200 or 304
if url not exists string begin - is 404
Børge Holen пишет:
On Wednesday 09 July 2008 12:18:27 cr.vegelin@gmail.com wrote:Hi All, I have a Directory table with hundreds of URL's to sites and want to check periodically if all the URL's still exist. Does anyone know of a utility to check this ? Or a pointer to a piece of code ... TIA, Corping whois traceroute ... and a lot more