proxy for cURL? Squid proxy didn't work.

Discussion in 'PHP' started by izzy_affiliate, Mar 1, 2009.

  1. #1
    Hello guys,

    I have a VPS with 2 IPs, I installed Squid and got 2 elite proxies.
    They worked great on my browser.

    However when i used proxies with cURL it returned a blank page:(

    <?php
    $ch = curl_init(); 
    curl_setopt($ch, CURLOPT_URL, 'http://www.google.com'); 
    curl_setopt($ch, CURLOPT_HEADER, 1); 
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); 
    curl_setopt($ch, CURLOPT_HTTPPROXYTUNNEL, 1); 
    curl_setopt($ch, CURLOPT_PROXY, '00.00.000.00:3128'); 
    curl_setopt($ch, CURLOPT_PROXYUSERPWD, 'username:password'); 
    $data = curl_exec($ch); 
    curl_close($ch); 
    
    echo $data
    ?>
    Code (markup):
    Could you guys please tell me what I am doing wrong?
    How can i make a proxy that works with cURL?
    Where can I buy proxy for cURL?

    Any help will be hugely appreciated.
    Thanks
     
    izzy_affiliate, Mar 1, 2009 IP
  2. harrisunderwork

    harrisunderwork Well-Known Member

    Messages:
    1,005
    Likes Received:
    21
    Best Answers:
    0
    Trophy Points:
    135
    #2
    Why u need to buy proxies, you can use any proxy found in google.
     
    harrisunderwork, Mar 2, 2009 IP