Re: Problem submitting a POST request "by hand"

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I send something using fsockopen() & fputs() :-)

Client sends request (submits form to my script) to me (i.e. server) and I want to send back to client a page with POST parameters from my script. But the page doesn't display in the clients browser (blank page opens). Question: what is missing in this script?

Vallo

Chris Shiflett wrote:
--- Vallo Reima <vallo@xxxxxxxxx> wrote:

I send the parameters from one php script to another via POST method.
The solution works (see example  below) but the receiver page loads
ONLY if I include the echo $c; command after send_host (see PROBLEM!!!
line).


Without looking at your code, I can tell that this seems to not be a
problem at all but rather a misunderstanding about what you're doing.

A client sends a request to a server, and the content of the response is
displayed. This is an oversimplified explanation of how a typical HTTP
transaction works.

In your case, the client sends a request to the server (you), and you're
sending a request to another server while the client waits on your
response. If you don't send anything, the client won't receive anything -
it's pretty simple, really. :-)

In other words:

Client   <--->   You   <--->   Other Server

Hope that helps.

Chris

=====
Chris Shiflett - http://shiflett.org/

PHP Security - O'Reilly     HTTP Developer's Handbook - Sams
Coming Soon                 http://httphandbook.org/

-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux