I am trying to get curl to work with a proxy. But it never works! Is my code correct? I have tried many different proxy ip's, all having the same result!
For example, some came from here:
http://www.publicproxyservers.com/page1.html
$url = "http://google.com";
$proxy = "89.250.7.160:3128";
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 0);
curl_setopt($ch, CURLOPT_HEADER, 1);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($ch, CURLOPT_PROXY, $proxy);
curl_setopt($ch, CURLOPT_HTTPproxyTUNNEL, 1);
curl_exec ($ch);
print print_r(curl_getinfo($ch));
curl_close($ch);
When it prints the info array, most of it has a value of "0"