I've asked my host plenty of times now if this was on their side, and they said no. Everything in cURL is working/enabled; however, whenever I try the below code, I can never get a connection or page returned (I've tested many differnet working proxies).
<?php
//THIS IS A TEST
$ch = curl_init('http://www.google.com');
curl_setopt($ch, CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows NT 6.1; WOW64; rv:14.0) Gecko/20100101 Firefox/14.0.1');
curl_setopt($ch, CURLOPT_PROXY, '114.80.136.112:7780');
curl_setopt($ch, CURLOPT_TIMEOUT, 40);
curl_exec($ch);
echo curl_error($ch);
print_r(curl_getinfo($ch));
curl_close($ch);
?>
Can anyone else test this function for me and see if they get any working results?
EDIT: HAVE ALSO TRIED
<?php
//THIS IS A TEST
$ch = curl_init('http://www.google.com');
$f = fopen('requests.txt', 'w');
curl_setopt_array($ch, array(
CURLOPT_PROXY => '114.80.136.112:7780',
CURLOPT_PROXYTYPE => CURLPROXY_HTTP,
CURLOPT_USERAGENT => 'Mozilla/5.0 (Windows NT 6.1; WOW64; rv:14.0) Gecko/20100101 Firefox/14.0.1',
CURLOPT_TIMEOUT => 40,
CURLOPT_VERBOSE => 1,
CURLOPT_STDERR => $f,
));
curl_exec($ch);
fclose($f);
echo curl_error($ch);
print_r(curl_getinfo($ch));
curl_close($ch);
?>
That returned this in results.txt
* About to connect() to proxy 114.80.136.112 port 7780 (#0)
* Trying 114.80.136.112...
* Timeout
* connect() timed out!
* Closing connection #0