Hi all
is there a way to tell CULR not to wait execution of URL given, or is it possible to setup CURL curl_setopt($ch, CURLOPT_TIMEOUT, 0.00001);
thank you all
kind regards
ddragas
curl => don't wait execution
Moderator: General Moderators
Re: curl => don't wait execution
can I suggest you multi-threading?
Re: curl => don't wait execution
Now tell him how to write multi-threaded PHP code.chakhar86 wrote:can I suggest you multi-threading?
Hint: You can't.
You can use Multi Curl though - http://www.phpied.com/simultaneuos-http ... with-curl/ - it's not really the same as not waiting for the response though. If you just need to send a request to a page without waiting, or caring about, the response then an exec() call to wget might be a better option. Or alternatively you could use fsockopen() and set the socket to non-blocking. There's lots of ways of doing this sort of thing.