Re: Re[2]: [PHP] Fsockopen and fgets problem. I'm lost need help
| From: | Matt | Date: | Thu, 08 Aug 2002 12:28:48 +0000 |
| Subject: | Re: Re[2]: [PHP] Fsockopen and fgets problem. I'm lost need help | ||
| References: | 1 2 3 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-111636@lists.php.net to get a copy of this message | ||
>>>From: "Latex Master" <freeman@submission.org.ru>
>>>Sent: Thursday, August 08, 2002 7:39 AM
>>>Subject: [PHP] Fsockopen and fgets problem. I'm lost need help
>>> while (fgets($ns, 100000) !== "."){
>>
>> M> Perhaps this needs to be:
>> M> while (fgets($ns, 100000) != "."){
>>
>> While (fgets($ns, 100000) !== "."){
>> echo fgets($ns, 100000)."<br>";
>> }
>> M> fgets returns a string, and you're comparing identical with a single
char.
>From: "Latex Master" <freeman@submission.org.ru>
>Sent: Thursday, August 08, 2002 7:59 AM
>Subject: Re[2]: [PHP] Fsockopen and fgets problem. I'm lost need help
> Hello Matt,
> Tried it also. and get the same
> Thursday, August 8, 2002, 3:52:10 PM, you wrote:
Sorry, I didn't read far enough. I think you're dropping the response into
the bit bucket because you're oing a second read and echoing it. This ought
to read:
while (($str = fgets($ns, 100000)) != "."){
echo "$str<br>";
}