|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[1999-06-18 11:54 UTC] sas at cvs dot php dot net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Oct 27 01:00:02 2025 UTC |
The following code causes about a 10 to 15 second delay/hang before finishing. I'm not sure why it takes so long to read from the socket, the server here on our LAN returns a reponse to the initial fwrite() almost instantly... I have a perl script that uses similar code and it's instantaneous. $socket = fsockopen($h_addr, $h_port, &$errno, &$errstr); $cmd = "arbitrary data"; fwrite($socket, $cmd, strlen($cmd)); while (!feof($socket)){ $buffer .= fread( $socket, 1024); } fclose ($socket);