cURL / Mailing Lists / curl-and-php / Single Mail

curl-and-php

Re: HTTP POST with PHP & cURL and follow redirect

From: Roger Chang <tungshan_at_earthlink.net>
Date: Wed, 22 Aug 2001 23:23:23 -0700

Daniel- Everything you said it right on the money.

By "the 2nd half of the form", I mean that the form has two parts. The 2nd part of the form takes the input of the 1st part to create hidden fields and the 2nd part of the form has some more fields to fill out.

You stated the essence of my problem:

>Your script posts to http://www.post-to-me.com/action2.asp and you get a full
>page of HTML back (to your PHP program). Person A's browser is now on
>http://www.mysite.com/script.php and doesn't show anything unless your script
>decides to do so.

I can output the results of the POST to the user's browser. But, the brower's url still shows: http://www.mysite.com/script.php. I want to url to show: http://www.post-to-me.com/action2.asp

>You want the browser to skip over to http://www.post-to-me.com/action2.asp?
>You send a 'Location:' header to the browser to make it go there.
>*BUT* it is not likely to work, as the site was designed to go there on a
>POST operation and when using Location: you go there with a GET request.

How do I get the above to work?

Roger
Received on 2001-08-23