Re: [php] read/write error
| From: | HELP! | Date: | Fri, 12 Jun 2009 14:11:37 +0000 |
| Subject: | Re: [php] read/write error | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-293974@lists.php.net to get a copy of this message | ||
I can not get the stream_get_contents() to work. it's returning empty.
If you have a login details "ALOGINPASS 1A" cant you just fwrite($ft,
"ALOGINPASS 1A"); or do you need to add other things
what is the meaning of this string" GET / HTTP/1.0\r\nHost:
www.example.com\r\nAccept <http://www.example.com/r/nAccept>: */*\r\n\r\n"
On Wed, Jun 10, 2009 at 3:51 PM, Robin Vickery <robinv@gmail.com> wrote:
> 2009/6/8 HELP! <izoduwa@gmail.com>
>
>> opening of the sorket is ok and writting LOGIN packet to the sorket is
>> also
>> ok but reading the response to know if the login is accepted or rejected
>> is
>> a not OK.
>
>
> Don't use fread() to read from sockets, use stream_get_contents(). Example
> 3 on the fread() manual page tells you why.
>
> -robin
>
--
www.bemycandy.com