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: Tue, 21 Aug 2001 13:29:15 -0700

I'm not following what your saying. Let me clarify what I want to do:

Here is what happens now:
1) I go to site: http://www.post-to-me.com/form.html
2) I fill out the form and hit submit (which runs
http://www.post-to-me.com/action2.asp)
3) The url in my browser window is now http://www.post-to-me.com/action2.asp
and then the 2nd half of the form appears.

Here is what I want to simulate:
1)Person A goes to http://www.mysite.com
2) He fills out the form and hits submit (which runs
http://www.mysite.com/script.php)
3) In script.php, I want to process the form information and then POST to
http://www.post-to-me.com/action2.asp
4) So after my script POSTS to http://www.post-to-me.com/action2.asp, Person
A's browser should have the 2nd half of the form and the URL in the browser
should show http://www.post-to-me.com/action2.asp

How can I do this using the standalone cURL module? I did not compile PHP
with the cURL option.

Roger

----- Original Message -----
From: <curl-and-php-request_at_lists.sourceforge.net>
To: <curl-and-php_at_lists.sourceforge.net>
Sent: Tuesday, August 21, 2001 12:08 PM
Subject: Curl-and-php digest, Vol 1 #74 - 1 msg

> Send Curl-and-php mailing list submissions to
> curl-and-php_at_lists.sourceforge.net
>
> To subscribe or unsubscribe via the World Wide Web, visit
> http://lists.sourceforge.net/lists/listinfo/curl-and-php
> or, via email, send a message with subject or body 'help' to
> curl-and-php-request_at_lists.sourceforge.net
>
> You can reach the person managing the list at
> curl-and-php-admin_at_lists.sourceforge.net
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of Curl-and-php digest..."
>
>
> Today's Topics:
>
> 1. Re: HTTP POST with PHP & cURL and follow redirect (Daniel Stenberg)
>
> --__--__--
>
> Message: 1
> Date: Tue, 21 Aug 2001 08:48:02 +0200 (MET DST)
> From: Daniel Stenberg <daniel_at_haxx.se>
> To: curl and php list <curl-and-php_at_lists.sourceforge.net>
> Subject: Re: HTTP POST with PHP & cURL and follow redirect
> Reply-To: curl-and-php_at_lists.sourceforge.net
>
> On Fri, 17 Aug 2001, Roger Chang wrote:
>
> > I POST information with cURL through a PHP script, but I don't know how
> > to make the web browser follow the results of the POST.
> >
> > Using cURL 7.8
> >
> > <?PHP
> >
> > $URL="http://www.post-to-me.com/cgi-bin/script";
> >
> > exec("/usr/local/bin/curl -d \"field1=blah&field2=blah\" $URL -L");
> >
> > ?>
>
> Then you don't want to let curl follow the redirect, you want to pass on
the
> redirect header to the browser.
>
> --
> Daniel Stenberg -- curl groks URLs -- http://curl.haxx.se/
>
>
>
>
> --__--__--
>
> _______________________________________________
> Curl-and-php mailing list
> Curl-and-php_at_lists.sourceforge.net
> http://lists.sourceforge.net/lists/listinfo/curl-and-php
>
>
> End of Curl-and-php Digest
Received on 2001-08-21