|
Posted by Colin McKinnon on 06/28/05 11:04
Lisa Pearlson wrote:
> Hi,
>
> I have a php script with no more than this:
>
> <?php echo "Hello World!"; ?>
>
<snip>
>
> c
> Hello World!
> 0
>
> =======================
> QUESTIONS:
> - Where do the 'c' and '0' come from? '0' just denoting the end of the
> data? -
They shouldn't be there - most likely a charset issue - from the shell try
cat -v myscript.php
> How do I prevent HTTP headers sent back to the client? I wish to
> only send "Hello World!", without any headers.
Then you can't do it via HTTP / an apache module (actually, you probably
could, but it would ned a lot of hacking). Without HTTP though, there's no
defined way of getting parameters into your script.
> The reason is that the
> client will be a piece of hardware that expects binary data as response,
<snip>
>
> I use the following php script to simulate a client requesting the php
> page, and display the headers:
>
> $header = "POST $cgi HTTP/1.1\r\n";
> $header .= "Host: $host\r\n";
<snip>
There's something very broken here - the client wants to talk HTTP, but you
say that it won't listen to HTTP. R U sure?
C.
Navigation:
[Reply to this message]
|