Re: Checking if a website is up?
| From: | Chris Hayes | Date: | Tue, 30 Mar 2004 10:47:21 +0000 |
| Subject: | Re: Checking if a website is up? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-181798@lists.php.net to get a copy of this message | ||
I am trying to check if a website is up (reachable) and I have used the standard code below: [...]
Maybe you can find something in the curl functions? http://nl3.php.net/manual/nl/ref.curl.php$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 ) )