On 29 Apr 2005, at 22:24, Carl Seghers wrote:

>  Your example worked on my configuration by adding
>
>  � while (! feof($sp))
>  � {
>  ��� print fgets($sp, 128);
>  � }
>
>  before the fclose.
>
>  The only thing is; you also get the response header back (the actual
>  contents starts with "Hi Carl"):
>
>  HTTP/1.1 200 OK Date: Fri, 29 Apr 2005 21:09:28 GMT Server:
>  Apache/1.3.33 (Win32) PHP/4.3.10 X-Powered-By: PHP/4.3.10 Connection:
>  close Transfer-Encoding: chunked Content-Type: text/html 8A Hi Carl. 
> You
>  are 38 years old. 0
>
>  I don't know how to make your browser take this header into account
>  when displaying the rest of the message.�� Would appreciate if 
> somebody
>  could fill in the blanks here.

Hi Carl,

Hey thanks! That really helps.
I think I was misunderstanding how it this works, but now it's clearer.

I added your while() into my example as you suggested & I posted to a 
second page.
The second page simply had:

foreach($_POST as $key => $value){
        echo "<br /> $key = $value";
}

So, to clarify, what happens is the POST is sent to the second page, & 
the result from the second page is sent back & displayed on the first 
page. Page 2 is never actually loaded in the browser, just the result 
in the fgets() part on page 1.

Right, so now I can do something with this.

Question: How do I eliminate the headers from the browser output? - so 
I just get the result of page 2.

i.e: my browser displays the following, but I just want the "field1= 
value1... etc"  part

HTTP/1.1 200 OK Date: Sat, 30 Apr 2005 14:48:15 GMT Server: 
Apache/1.3.33 (Darwin) PHP/5.0.3 X-Powered-By: PHP/5.0.3 Connection: 
close Content-Type: text/html
field1 = value1
field2 = value2
field3 = value3

Your input on this is much appreciated, I was about to give up on it.
Thank you,
Riquez

[Non-text portions of this message have been removed]



Community email addresses:
  Post message: [email protected]
  Subscribe:    [EMAIL PROTECTED]
  Unsubscribe:  [EMAIL PROTECTED]
  List owner:   [EMAIL PROTECTED]

Shortcut URL to this page:
  http://groups.yahoo.com/group/php-list 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/php-list/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 



Reply via email to