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

From: Date: Fri, 03 Sep 2004 20:48:56 +0000
Subject: using 'while' without stopping the script from processing, Please help!
Groups: php.general 
Request: Send a blank email to php-general+get-195841@lists.php.net to get a copy of this message
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!

« previous php.general (#195841) next »