Hi,
I have one big problem with curl and vBullein forum. It is killing, I am going crazy about it. Could you help me? I tried everything I know and could find.
I have script which should post thread to forum from my page. I tried to login into phpBB forum and it worked just fine but when I try to login into vBulletin forum, it doesn't work. I have this script:
Code:
$md5Pass = md5($_POST["pass"]);
$user=$_POST["ucet"];
$data = "do=login&url=/newthread.php?do=newthread&f=25&vb_login_md5password=$md5Pass&vb_login_username=$user&cookieuser=1&securitytoken=guest";
curl_setopt($ch, CURLOPT_REFERRER, "mypage");
curl_setopt ($ch, CURLOPT_URL, "http://forum.org/login.php?do=login");
curl_setopt ($ch, CURLOPT_USERAGENT, "Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)");
curl_setopt ($ch, CURLOPT_TIMEOUT, '10');
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch,CURLOPT_POSTFIELDS,$data);
curl_setopt($ch, CURLOPT_COOKIEJAR, "cookies/cookie_1.txt");
curl_setopt($ch, CURLOPT_COOKIEFILE, "cookies/cookie_1.txt");
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);
$store = curl_exec ($ch);
When I let $store echo out, it showing me that I was successfully login and it will redirect me to url page, but when it does or when I try to do another script
Code:
(curl_setopt($ch, CURLOPT_URL, "page I want to post in"); $content = curl_exec ($ch);)
it shows me
Code:
"Your submission could not be processed because you have logged in since the previous page was loaded.Please push the back button and reload the previous window."
I only assume it's something wrong with cookies.
Could you help me please?