Have the following code:
$ch = curl_init();
curl_setopt ($ch, CURLOPT_REFERER, $url);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_PROXY, $proxy);
curl_setopt($ch, CURLOPT_VERBOSE, 1);
curl_setopt($ch, CURLOPT_HEADER, 1);
curl_setopt($ch, CURLOPT_TIMEOUT, 10);
curl_setopt($ch, CURLOPT_URL, $url);
$pageContents = curl_exec($ch);
echo curl_error($ch);
curl_close($ch);
I have tried all combinations of CURLOPT, somehow NONE of the proxies seem to work. If I comment out the line with curl_setopt($ch, CURLOPT_PROXY, $proxy) it works fine. What am I doing wrong?