Troubleshooting PHP cURL with proxies at Godaddy.com
This code block will work for Godaddy hosting accounts that require outbound connections via their proxy.
curl_setopt($ch, CURLOPT_VERBOSE, 1);
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt ($ch, CURLOPT_PROXYTYPE, CURLPROXY_HTTP);
//"http://64.202.165.130:3128"
curl_setopt ($ch, CURLOPT_PROXY,"http://proxy.shr.secureserver.net:3128");
curl_setopt($ch, CURLOPT_TIMEOUT, 30);
curl_setopt($ch, CURLE_OPERATION_TIMEOUTED, 30);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
If you're using software that uses cURL but isn't working on your Godaddy account, you may have to do some modification as shown above to make it work. I prefer using the real URL vs. the IP number because they may change the IP at any time...
Of course this proxy connection is only available for Godaddy accounts. Trying to connect to it from a desktop application will not work.
-Jeffery
curl_setopt($ch, CURLOPT_VERBOSE, 1);
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt ($ch, CURLOPT_PROXYTYPE, CURLPROXY_HTTP);
//"http://64.202.165.130:3128"
curl_setopt ($ch, CURLOPT_PROXY,"http://proxy.shr.secureserver.net:3128");
curl_setopt($ch, CURLOPT_TIMEOUT, 30);
curl_setopt($ch, CURLE_OPERATION_TIMEOUTED, 30);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
If you're using software that uses cURL but isn't working on your Godaddy account, you may have to do some modification as shown above to make it work. I prefer using the real URL vs. the IP number because they may change the IP at any time...
Of course this proxy connection is only available for Godaddy accounts. Trying to connect to it from a desktop application will not work.
-Jeffery


0 Comments:
Post a Comment
<< Home