Re: [PHP] [php] read/write error

[email protected] (Robin Vickery)
Newsgroups php.general
Message-ID <[email protected]>
Hello Mr HELP!

2009/6/12 HELP! <[email protected]>
>
> 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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.