Page 1 of 1

Implementing proxies into php script

Posted: Thu Jan 31, 2008 6:47 pm
by maqeulek
Hello,

I'm trying to implement proxies into my script that sends search requests to yahoo. First I just want to be able to implement a proxy to this simple script:

Code: Select all

 
<?php
//implement proxy
 
    $cUrl = curl_init();
    
            curl_setopt($cUrl, CURLOPT_URL, "http://search.yahoo.com");
            curl_setopt($cUrl, CURLOPT_HTTPPROXYTUNNEL, 1);
            curl_setopt($cUrl, CURLOPT_PROXY, '210.22.158.132:8080');
            
    curl_exec($cUrl);
    curl_close($cUrl);
?>
 
I can't get this to work, am I missing something? Please help.