You have a few problems, but they should be easy to figure out. First, you set the host in a non-host header in the URL request, but since you are using HTTP1.0, this is not necessary.
Secondly, you need each line in HTTPHEADER as its own thing in the array, and you do not include the GET line.
curl_setopt($ch, CURLOPT_HTTPHEADER, array( 'User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:6.0.2) Gecko/20100101 Firefox/6.0.2', 'Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8', 'Accept-Language: en-gb,en;q=0.5', 'Accept-Encoding: gzip, deflate', 'Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7', 'Proxy-Connection: Close', 'Cookie: PREF=ID=2bb051bfbf00e95b:U=c0bb6046a0ce0334:', 'Cache-Control: max-age=0', 'Connection: Close' ));
(You obviously stole this from Firefox and the old version, but we will give it a slide.) Finally, yes, you must tell CURLOPT_URL that the cURL API is designed that way.
source share