Re: [php] read/write error
| From: | Robin Vickery | Date: | Fri, 12 Jun 2009 16:15:41 +0000 |
| Subject: | Re: [php] read/write error | ||
| References: | 1 2 3 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-293979@lists.php.net to get a copy of this message | ||
Hello Mr HELP!
2009/6/12 HELP! <izoduwa@gmail.com>
>
> I can not get the stream_get_contents() to work. it's returning empty.
Is that simply because there's nothing to read from the socket?
> If you have a login details "ALOGINPASS 1A" cant you just fwrite($ft,
> "ALOGINPASS 1A"); or do you need to add other things
You've not told us what protocol you're using, but a quick google
search seems to indicate that you're trying to send a login request
message for a market data stream.
You appear to using the character 'A' as the request terminator,
whereas market data streams generally use 0x0A, which is a linefeed
character.
If the stream hasn't realised you've finished sending your login
request, then it won't send a response.
> what is the meaning of this string" GET / HTTP/1.0\r\nHost: www.example.com\r\nAccept:
> */*\r\n\r\n"
It's a HTTP 1.0 GET request, but that doesn't seem to be consistent
with the rest of the data you've mentioned.
-robin