note 38904 deleted from function.socket-read by nlopess

From: Date: Sun, 11 Jan 2004 09:55:33 +0000
Subject: note 38904 deleted from function.socket-read by nlopess
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-63309@lists.php.net to get a copy of this message
Note Submitter: zhouxh@im.ac.cn ---- <?php //it's work fine on Windows and Linux for me. $_ENV['OS'] == 'Windows_NT' ? define('EOF',"\r\n") : define('EOF',"\n"); //read strings from client machine function read($msgsock){ $buf = $red =''; while(true){ if(($red = socket_read($msgsock,1024)) == EOF){ break; } $buf .= $red; } return trim($buf); } //other code... ?>

« previous php.notes (#63309) next »