Re: Problem submitting a POST request "by hand"
| From: | Vallo | Date: | Mon, 28 Feb 2005 20:16:39 +0000 |
| Subject: | Re: Problem submitting a POST request "by hand" | ||
| References: | 1 2 | Groups: | php.general php.general |
| Request: | Send a blank email to php-general+get-209614@lists.php.net to get a copy of this message | ||
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@hareko.ee> 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/