0

I've got two PC's, but both have another IP. The simple question is how to use one of the PC's as a proxy for the other one, by using cURL, so requests from both PC's will have the same IP.

Is there a way to turn one PC into a proxy server and then make cURL make requests using that IP?

2 Answers 2

1

Yes, there are lot's of proxy packages running out of the box (you could even configure apache to do it). Wouldn't recommend rolling your own in PHP if that's what you're after. You can configure curl easily to use a proxy, see the curl_setopt possibilities.

Sign up to request clarification or add additional context in comments.

4 Comments

Could you help me with providing a solution for say WAMPSERVER to run as proxy?
You can google how to do it with apache, but @lenzai's suggestion of using squid is an excellent one, and relatively easy to set up.
I've downloaded Squid, how to run it so I can access the PC as proxy?
squid comes with a manual, google comes with answers (i.e: try to set things up, ask a new question about squid if you encounter a problem).
1

if you are runnning a webserver on each machine , then you can install a php proxy script. see Google PHP Proxy search results : at least 4 choices on first page.

if you are not running a webserver. Then I suggest you download a standalone proxy such as squid.

This options works for windows or linux. You can download squid for windows here. just unzip and run squid, not setup required.

2 Comments

Say I want to use Squid, how can I access this PC from cURL? Squid is command-line, right?
for squid: curl -p <ip_address>:3128 ...... for phpproxy you would probably do something very similar : curl -p <ip_address>:80 .....

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.