Possible Duplicate:
PHP: Can CURL follow meta redirects
<?php
error_reporting(E_ALL);
ini_set("display_errors", 1);
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'http.....');
curl_setopt($ch,CURLOPT_POST,1);
curl_setopt($ch, CURLOPT_HEADER,1);
curl_setopt($ch, CURLINFO_HEADER_OUT,1);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 0);
curl_setopt($ch,CURLOPT_AUTOREFERER,0);
curl_setopt($ch,CURLOPT_POSTFIELDS,"vb_login_username=***&vb_login_password=***&do=login");
curl_exec($ch);
curl_close($ch);
?>
I want to login to a vbuletin forum. This login script works (it show the login success dialog), but after seconds, it redirects to the index page. I knew the problem, that is:
<META HTTP-EQUIV="refresh" CONTENT="seconds;URL=the-other-url">`
I need a solution to stop this :D