5th May 2011, 09:52 AM | #1 |
Tony Marriott War Room Member Join Date: 2009 Location: UK
Posts: 1,294
Thanks: 381
Thanked 548 Times in 405 Posts
|
Can someone please give me price for the following task I want a PHP script to get the contents of a web URL file via a proxy. The script below appears technically correct but does not work. The script does not need to be this one fixed it can be a completely new one as long as it works in practice. alternatives using fopen or file_get_contents, or any other working solution is poerfectly acceptable I would also like additional “fast” script to rotate or randomly select the proxy from a list/db file. Please PM with answers or email Tony.Marriott@hotmail.co.uk thanks guys. ----------------------------------------- $filename is an arbitary web site $proxy is a free public proxy but was Working at the time of posting $filename = "http://www.Google.com”; $proxy = "60.175.203.243:8080"; $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $filename); curl_setopt($ch, CURLOPT_HEADER, 1); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_HTTPPROXYTUNNEL, 1); curl_setopt($ch, CURLOPT_PROXY, $proxy); $data = curl_exec($ch); curl_close($ch); echo $data; ?> |
| |
18th May 2011, 10:38 PM | #2 |
Active Warrior Join Date: 2009
Posts: 69
Thanks: 3
Thanked 7 Times in 7 Posts
|
This should be working. If it's not, port 8080 is blocked by your firewall or the proxy is not working correctly. I can modify this script to rotate proxies for $25. PM me if you are interested. |
| |
Bookmarks |
Tags |
createte or fix, php, proxy, script, url |
| |