Re: non-blocking request to a url (via curl or file_get_contents or whatever)...

From: Date: Sun, 21 Jan 2007 09:56:55 +0000
Subject: Re: non-blocking request to a url (via curl or file_get_contents or whatever)...
References: 1 2 3 4  Groups: php.general 
Request: Send a blank email to php-general+get-247483@lists.php.net to get a copy of this message
# jochem@iamjochem.com / 2007-01-20 22:43:58 +0100: > that would mean the 'fastest' I could push out the http request is > probably by doing: > > if ($sock = fsockopen($proto.$url[1], $port, $errno, $errstr, 4)) { > fwrite($sock, "GET {$url[2]} HTTP/1.0\r\n"); > fwrite($sock, "Host: {$url[1]}\r\n"); > fwrite($sock, "\r\n"); > fclose($sock); > } That's quite possibly the fastest way to a "client aborted connection" messages in their error log without achieving the desired action on the server. Either way, you either take care to receive the response or you don't care much about making the request at all. IMO. -- How many Vietnam vets does it take to screw in a light bulb? You don't know, man. You don't KNOW. Cause you weren't THERE. http://bash.org/?255991

« previous php.general (#247483) next »