Posted by Janwillem Borleffs on 01/21/08 15:45
Marcel Molenaar wrote:
> It would be nice to fire the two requests at the same time so the
> total would be 3 seconds instead of 5 seconds.
>
> I do not think this is possible with PHP or am i wrong?
>
If you are using fsockopen to build your connection, you can use
stream_set_blocking to select non-blocking mode, which enables you to do
multiple requests as the following example shows:
http://playground.jwscripts.com/async-streams.phps
Using the SOAP extension, you might be able to use forking:
http://www.php.net/manual/nl/function.pcntl-fork.php
See this page for OS-specific restrictions.
HTH;
JW
Navigation:
[Reply to this message]
|