I am trying to check if a website is up (reachable) and I have used the standard code below: [...]
$socket = @fsockopen( $host, $port, $errno, $errstr, 30 ); if (!$socket) fwrite ($socket, "HEAD ".$documentpath." HTTP/1.0\r\nHost: $host\r\n\r\n"); $http_response = fgets( $socket, 22 );
if ( ereg("200 OK", $http_response, $regs ) )
Maybe you can find something in the curl functions? http://nl3.php.net/manual/nl/ref.curl.php
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php