Re: cURL: can't prevent url redirect

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

 



Andrew Warner wrote:
This login script works when I use Snoopy (php http class), but here with php curl the response is the redirected page. The script is following a 302 redirect and I don't want it to because I need some header info from the 302 page. The curl_setopt($ch, CURLOPT_MAXREDIRS, 0); doesn't seem to be preventing redirect:

    $ch = curl_init();
    curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_MAXREDIRS, 0);
    //curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 0);

Why is FOLLOWLOCATION commented out?

If you set that does it do what you want (that should be the one controlling the redirect) ?

--
Postgresql & php tutorials
http://www.designmagick.com/

--
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