cookies - php curl strange question -


when create 1 curl object $ch = curl_init(); , go on many site pages, it's ok (if pass cookie), if create each request new curl object, if set cookie, site anyway redirect me login page. object curl contains else allow site recognize curl client? must set except cookie?

the remote server might checking 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); 

Comments

Popular posts from this blog

SAP Web Service from .NET via WCF -

Optimized Line drawing in QT -

datetime - str to time in python -