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

curl-and-php

RE: HTTP POST with PHP & cURL and follow redirect

From: Mark <mark.green_at_dingoblue.com.au>
Date: Thu, 23 Aug 2001 16:38:35 +1000

Hey Roger,

Technically you cant do that.

The only way to make the top URL show the new URL is as daniel suggested by
redirecting to http://www.post-to-me.com/action2.asp which may/may not work
depending on the way the action2.asp script is constructed.

Otherwise the URL will remain the URL of the script which is executing..

/Mark

 -----Original Message-----
From: curl-and-php-admin_at_lists.sourceforge.net
[mailto:curl-and-php-admin_at_lists.sourceforge.net]On Behalf Of Roger Chang
Sent: Thursday, 23 August 2001 4:23 PM
To: curl-and-php_at_lists.sourceforge.net
Subject: Re: HTTP POST with PHP & cURL and follow redirect

  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