[PHP] using 'while' without stopping the script from processing, Please help!

2004-09-04 Thread Mark Clarkstone
Hi, I'm making an MSN bot in PHP  the only way to receive data is to
loop over each socket, the only problem is that while its looping its
stopping the rest of the script from being run at the same time.
Is there anyway I can Process each socket without stopping the script,
I'm currently using


$msn = New MSN;
$msn-Connect();
while($msn-MSNC) { 
$msn-ProcessCommands();
for($i = 0 ; $i  500 ; $i++)
{
if($socket[$i])
{
echo fpassthru($socket[$i]); 
}
}
}


Any examples I'd be very greatful!


Thanks!

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] using 'while' without stopping the script from processing, Please help!

2004-09-04 Thread Pablo M. Rivas
On Fri, 3 Sep 2004 21:48:56 +0100, Mark Clarkstone [EMAIL PROTECTED] wrote:
 Hi, I'm making an MSN bot in PHP  the only way to receive data is to
 loop over each socket, the only problem is that while its looping its
 stopping the rest of the script from being run at the same time.
 Is there anyway I can Process each socket without stopping the script,

Mark: for unix/linux: http://www.php.net/manual/en/ref.pcntl.php
and in this page you'll find examples, and a tip for PHP-CLI onWin32 




-- 
Pablo M. Rivas. http://pmrivas.ipupdater.com
---

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php