1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Curl and Proxies - How to set up?

Discussion in 'Proxies' started by binkage, Mar 13, 2011.

  1. binkage

    binkage Newbie

    Joined:
    Jan 26, 2010
    Messages:
    6
    Likes Received:
    0
    Greetings,

    I am trying to use curl/php to spoof the referrer but the big problem right now is that the IP address is the same for all visitors, it is just my server's IP address.

    I heard that it may be possible to get around this by using proxies. Do I have to own a proxy on my server or can curl redirect the user through another proxy and still retain the spoofed referrer? If so, how can I do this?

    Thanks
    Kind regards
     
  2. DenRomano

    DenRomano Newbie

    Joined:
    Feb 10, 2010
    Messages:
    24
    Likes Received:
    0
    Location:
    Las Vegas, NV
    Home Page:
    curl_setopt($ch, CURLOPT_PROXY, $proxy );
    curl_setopt($ch, CURLOPT_PROXYPORT, $proxy_port );
    curl_setopt($ch, CURLOPT_PROXYUSERPWD, $proxypassword);
     
  3. binkage

    binkage Newbie

    Joined:
    Jan 26, 2010
    Messages:
    6
    Likes Received:
    0
    Thanks for the setopts DenRomano,

    Can you provide a working example for these variables that I can test right now? I didn't realize passwords would be involved.

    Kind regards
     
  4. DenRomano

    DenRomano Newbie

    Joined:
    Feb 10, 2010
    Messages:
    24
    Likes Received:
    0
    Location:
    Las Vegas, NV
    Home Page:
    the password is not required unless it is required by paid proxies.
     
  5. justone

    justone Elite Member

    Joined:
    Oct 12, 2008
    Messages:
    1,516
    Likes Received:
    1,037
    Occupation:
    -
    Location:
    Europe
    Look here: http://seo-proxies.com/?tab=api
    It's actually free code for seo-proxies members but even if you are no member the curl+php functions should give you a good guide on how to use it.

    Here is a larger curl based example:
    http://google-scraper.squabbel.com/ (multi page google serp scraper)
    I think it also fakes referers, but don't know by heart.