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

curl-and-php

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