Hi,
I was looking through some code that someone has written for me and came across this:
//initialize the curl session
curl_setopt($this->ch, CURLOPT_URL,$url);
if (!empty($this->lastUrl))
curl_setopt($this->ch, CURLOPT_REFERER, $this->lastUrl);
curl_setopt($this->ch, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($this->ch, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($this->ch, CURLOPT_BINARYTRANSFER, 1);
curl_setopt($this->ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($this->ch, CURLOPT_FOLLOWLOCATION, 0);
curl_setopt($this->ch, CURLOPT_MAXREDIRS, 10);
curl_setopt($this->ch, CURLOPT_TIMEOUT, 60);
curl_setopt($this->ch, CURLOPT_CONNECTTIMEOUT, 60);
curl_setopt($this->ch, CURLOPT_HEADER, 1);
curl_setopt($this->ch, CURLOPT_USERAGENT, 'Mozilla/4.0 (compatible; MSIE 6.0; WINDOWS; .NET CLR 1.1.4322)');
$extraHeaders = array('Accept-Charset'=>'utf-8;q=0.7,*;q=0.5','Accept-Language'=>'en-us,en;q=0.5','Accept'=>'text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5');
curl_setopt($this->ch, CURLOPT_HTTPHEADER, $extraHeaders);
Well, I have never used this curl and would appreciate it if you can let me know what its doing
🙂
Thanks.