cURL
Haxx ad
libcurl

curl's project page on SourceForge.net

Sponsors:
Haxx

cURL > Mailing List > Monthly Index > Single Mail

curl-and-php mailing list Archives

Re: HTTP POST with PHP & cURL and follow redirect

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Tue, 21 Aug 2001 08:48:02 +0200 (MET DST)

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/
Received on 2001-08-21

These mail archives are generated by hypermail.

donate! Page updated November 12, 2010.
web site info

File upload with ASP.NET