Forum Moderators: coopster
I successfully login with IE to pro.imdb.com and got cookie, the same cookie copy in some file and in curl point to this file, so when ran curl I got login page instead of main index page, so I think pro.imdb.com has some security and I don't know where to look to solve the problem. Any help would be appreciated. thanks.
$ch = curl_init("$imdb");
curl_setopt($ch, CURLOPT_USERAGENT, $useragent);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 2);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($ch, CURLOPT_REFERER, $mysite);
curl_setopt($ch, CURLOPT_COOKIEFILE, $setcookie);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 0);
curl_setopt($ch, CURLOPT_TIMEOUT, 20);
curl_setopt($ch, CURLOPT_HEADER, TRUE);
curl_setopt($ch, CURLOPT_BINARYTRANSFER, 1);
curl_setopt($ch, CURLOPT_FAILONERROR, 1);
If you are using Windows, get a free proxy server like:
HTTPeek
[freshmeat.net...]
and analyze what is happening during successful transactions - that should help you emulate one with CURL.