Curl Function in GoDaddy Hosting
I use GoDaddy Hosting for this site. A few days ago I tried to use the curl library. Curl was there - but all my calls timed out. I tried different approaches - but all failed. After some google searches I found out why - GoDaddy is using a proxy server.
So if you are using GoDaddy hosting and what to use curl, you should include these lines in the script...
<?php
curl_setopt($ch, CURLOPT_PROXYTYPE, CURLPROXY_HTTP);
curl_setopt($ch, CURLOPT_PROXY,"http://64.202.165.130:3128");
...assuming that $ch is the curl handle.
A full example...
<?php
$url = "http://www.google.com/";
$ch = curl_init();
curl_setopt ($ch, CURLOPT_URL, $url);
curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt ($ch, CURLOPT_PROXYTYPE, CURLPROXY_HTTP);
curl_setopt ($ch, CURLOPT_PROXY,"http://64.202.165.130:3128");
curl_setopt ($ch, CURLOPT_TIMEOUT, 120);
$response = curl_exec ($ch);
if(is_int($response)) {
die("Errors: " . curl_errno($ch) . " : " . curl_error($ch));
}
curl_close ($ch);
print "Remote Site : $url<br /><hr />$response";
?>
Read more about using curl at the GoDaddy support pages...

Comments
eda monae yu discovered that too..
hmm i just missed 2 mins .
presently the proxy server address looks like its:
http://proxy.shr.secureserver.net:3128
you're the man! kudos to you!
really thanks for this.
Do I create a curl.php file with the above code and upload it to my root directory on my server?
or
Do I edit the php.ini files?
or
Do I do something else?
I have been doing much research on this issue as I am having issues using a UPS module on my e-commerce website.
UPS requires an SSL certificate (Check) and Curl.
I am using a GoDaddy shared hosting account with no help from GoDaddy. Thank you for your time and information in advance. :)
Other then that I'm really liking your stuff ;-)
My hat's off to you for finding a solution to this situation.
a, strong, em, b, i, code, pre, pandbrallowed. Other tags will be shown as code(< will become <). Urls, Line breaks will be auto-formated.