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

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

 



# jochem@xxxxxxxxxxxxx / 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

-- 
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