This thing has eaten my lunch.. been working on it for 4 days.. searched all over hell and high water and tried every code snippet this side of the Mississippi and not one has worked for me... so I came to the experts... that is Perk.. to find a solution...
1. the url is live but xxx as not looking for a backlink.
2. If I use the blank proxy it connects fine.. but no matter what proxy I use no connect..
3. IF connection is made it will return your own IP just like IP chicken does... as that is just a test site..
4. The url is live and working... if you visit direct via browser you will see your IP..
5. I will forever be in your debt if you can see what I have done wrong...
thanks in advance....
<?php
function getPage($proxy, $url, $referer, $agent, $header, $timeout) {
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_HEADER, $header);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_PROXY, $proxy);
curl_setopt($ch, CURLOPT_HTTPPROXYTUNNEL, 1);
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, $timeout);
curl_setopt($ch, CURLOPT_REFERER, $referer);
curl_setopt($ch, CURLOPT_USERAGENT, $agent);
$result['EXE'] = curl_exec($ch);
$result['INF'] = curl_getinfo($ch);
$result['ERR'] = curl_error($ch);
curl_close($ch);
return $result;
}
// $proxy = '213.238.3.50:8080';
$proxy = '';
$str = getPage($proxy, 'hxxp://www.vahud.com/blognew/forward.php', 'hxxp://www.google.com', 'Mozilla', 1, 5);
print "<pre>";
print_r ($str);
print "</pre>";