[email protected] Posted August 26, 2008 Share Posted August 26, 2008 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" Link to comment https://forums.phpfreaks.com/topic/121443-curl-proxy-help/ Share on other sites More sharing options...
awpti Posted August 26, 2008 Share Posted August 26, 2008 Real question is: Why do you need a proxy? Link to comment https://forums.phpfreaks.com/topic/121443-curl-proxy-help/#findComment-626446 Share on other sites More sharing options...
[email protected] Posted August 26, 2008 Author Share Posted August 26, 2008 it's actually not the real question, the real question is the one i posted above. Link to comment https://forums.phpfreaks.com/topic/121443-curl-proxy-help/#findComment-626481 Share on other sites More sharing options...
[email protected] Posted August 28, 2008 Author Share Posted August 28, 2008 Anybody? Link to comment https://forums.phpfreaks.com/topic/121443-curl-proxy-help/#findComment-627494 Share on other sites More sharing options...
dtdetu Posted December 4, 2008 Share Posted December 4, 2008 Real question is: Why do you need a proxy? this is the most silly question i ever seen. there are millions of proxy around and millions of people using proxies, go and ask them why they are using proxies. [email protected] i have same problem with , curl doesnt work on webhosts with proxies it can work on my localhost and on cmd but not on webhost, does anyone have idea about this Link to comment https://forums.phpfreaks.com/topic/121443-curl-proxy-help/#findComment-705771 Share on other sites More sharing options...
lanmonkey Posted December 4, 2008 Share Posted December 4, 2008 www.glype.com Link to comment https://forums.phpfreaks.com/topic/121443-curl-proxy-help/#findComment-705922 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.