When i create only one curl object $ch = curl_init();
and then go on many site pages, it's ok (if i pass cookie), but if i create for each request new curl object, even if i set cookie, site anyway redirect me to login page.
what does object curl contains else that allow site recognize my curl client? what mus开发者_如何学Ct i set except cookie?
The remote server might be checking your user agent. Try setting it:
$ua = 'Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.12) '.
'Gecko/20101027 Ubuntu/9.10 (karmic) Firefox/3.6.12';
curl_setopt($ch, CURLOPT_USERAGENT, $ua);
精彩评论