Bug #17887 Updated: unable to read complete data stream with set_socket_blocked($fp,0)
| From: | jason@php.net | Date: | Mon, 01 Jul 2002 20:05:12 +0000 |
| Subject: | Bug #17887 Updated: unable to read complete data stream with set_socket_blocked($fp,0) | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-12708@lists.php.net to get a copy of this message | ||
ID: 17887
Updated by: jason@php.net
Reported By: sdsdgdds@yahoo.de
-Status: Open
+Status: Bogus
Bug Type: Sockets related
Operating System: Win XP
PHP Version: 4.2.1
New Comment:
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to
report
a bug at http://bugs.php.net/how-to-report.php
feof() returns true on an error, and EWOULDBLOCK is considerd an error
Previous Comments:
------------------------------------------------------------------------
[2002-06-20 17:55:32] sdsdgdds@yahoo.de
First of all I have to make a sleep() before I read data. Otherwise I
don't receive any. It doesn't matter how long I sleep I allways get the
same amount of data.
$ns = fsockopen("anyuri",80,$a,$a,$max);
$out="";
socket_set_blocking($ns,0);
fputs($ns,"GET / HTTP/1.1\r\nHost: anyuri\r\nConnection:
close\r\n\r\n");
sleep(1);
while(!feof($ns)) $out.=strtolower(fread($ns,128));
and how do I get the rest?
I tried to make another sleep and fread but there comes nothing. Even
if I made socket_set_blocking($ns,1); and tried to read the rest I
received nothing.
Everything works fine if I don't use socket_set_blocking($ns,0);
I tried it on some big sites and the maximum was about 25000 bytes!
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=17887&edit=1