|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2002-07-01 16:05 UTC] jason@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Oct 29 08:00:01 2025 UTC |
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!