|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[1999-07-16 06:47 UTC] sas at cvs dot php dot net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Thu Dec 18 14:00:01 2025 UTC |
This script connect's as a server to a irc server ith blocking mode off so it can do otherthings while in the loop But with connecting... it will hang after reading... and only when i let the irc server push many many data it will continu to function normal... <? echo "plop<BR>\n"; flush(); $fp = fsockopen("irc.net.local", 4400); if ($fp) { fputs($fp,"PASS :wisky\nSERVER Wico.net.local 1 932044265 932044265 J10 A 0 :plop\n"); set_socket_blocking($fp, 0); while (1 < 2) { sleep(1); echo "reading...."; flush(); $out = fgets($fp, 2); echo "done<BR>\n"; /* should come here directly, but isn't */ flush(); /* It's waiting till fgets is finished */ if ($out) { echo "boe: '$out'<BR>\n"; flush(); } } } ?>