Re: checking if URL's exist

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxx 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, Cor

ping whois traceroute ... and a lot more



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux