Curl and Proxies - How to set up?

binkage

Newbie
Joined
Jan 26, 2010
Messages
6
Reaction score
1
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
 
curl_setopt($ch, CURLOPT_PROXY, $proxy );
curl_setopt($ch, CURLOPT_PROXYPORT, $proxy_port );
curl_setopt($ch, CURLOPT_PROXYUSERPWD, $proxypassword);
 
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
 
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.
 
Back
Top