note 18487 added to function.socket-get-status
| From: | corruptNOSPAMPLEASE at mod dot net | Date: | Thu, 24 Jan 2002 22:51:44 +0000 |
| Subject: | note 18487 added to function.socket-get-status | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-25797@lists.php.net to get a copy of this message | ||
This function worked for me under 4.0.4pl1
bytes_left function will tell you how many bytes are left in the buffer of socket $fp. It assumes
you didn't make $fp global
function bytes_left($fp) {
$status = socket_get_status ($fp);
$bytes = $status["unread_bytes"];
return $bytes;
}
--
http://www.php.net/manual/en/function.socket-get-status.php
http://master.php.net/manage/user-notes.php?action=edit+18487
http://master.php.net/manage/user-notes.php?action=delete+18487
http://master.php.net/manage/user-notes.php?action=reject+18487