Re: cURL: can't prevent url redirect

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



oops... I see my mistake:

   foreach($restored_cookies as $name=>$value)
        array_push($the_headers, "Cookie: ".$name.'='.$value);


should be:

   $cookie='';
   foreach($restored_cookies as $name=>$value)
	   $cookie .= "$key=$value; ";

    $cookie = substr ($cookie,0,-2);

Then either:

      curl_setopt($ch, CURLOPT_COOKIE, $cookie);

or:
      array_push($the_headers, "Cookie: ".$cookie);

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux