feof with fsockopen don't work

From: Date: Thu, 03 May 2001 15:27:17 +0000
Subject: feof with fsockopen don't work
Groups: php.general 
Request: Send a blank email to php-general+get-51279@lists.php.net to get a copy of this message
Hi NG, my problem is following: I've write some code like this: $sFile = fsockopen($strHost,$intPort,$intErrNum,$strError,10); if (!empty($strError)) { echo ("Ein Fehler ist aufgetreten : $strError"); } else { $strCommand = trim($strCommand); $strAnswer = fgets($sFile,128); fputs($sFile,$strCommand); while(!feof($sFile)) { $strAnswer = $strAnswer."<BR>".fgets($sFile,128); } echo($strAnswer."<BR>"); fclose($sFile); The problem is that the while-loop never ends because feof() never be true. But the manual tell me that i can use the feof()-function with fsockopen() too. Can somebody help?????? Thanks, Thomas

« previous php.general (#51279) next »