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 [EMAIL PROTECTED] 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

Reply via email to