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

curl-and-php

RE: problem while redirecting with curl to an https

From: Lizet Peņa de Sola <lizet_at_krosslink.com>
Date: Thu, 6 May 2004 11:24:53 -0500

Which are the standard headers I should use?
I'm trying something like this without success:
$ch= curl_init();
   
   curl_setopt($ch, CURLOPT_URL, "https://www.foo.com");
   
   $arg= Array();
   $arg['email']=$email;
   $arg['lan']='en';
   $arg['submit']="blah blah";
   $header[]="Location: https://https://www.foo.com,*.*";
   curl_setopt($ch, CURLOPT_POST, 1);
   curl_setopt($ch, CURLOPT_POSTFIELDS, $arg);
   curl_setopt($ch, CURLOPT_FOLLOWLOCATION,1);
   curl_setopt ($ch, CURLOPT_HTTPHEADER, $header);

   curl_exec ($ch);
   curl_close ($ch);

>> the url that is shown is the one of the page making the request.

>Of course. That is the page the browser is watching. It has no idea how
you get the HTML you send back to it. If you want it to change to a
differerent URL, you need to pass on the standard headers that makes it
move.

-- 
     Daniel Stenberg -- http://curl.haxx.se -- http://daniel.haxx.se
      Dedicated custom curl help for hire: http://haxx.se/curl.html
Received on 2004-05-06