Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

initialize curl through various ip 1

Status
Not open for further replies.

richardko

Programmer
Jun 20, 2006
127
US
Hi,
I have a script that executes curl on various websites. I also have 5 internal ip for my box.
Is it possible to rotate execute the curl as if it was coming from one of those IP addresses?
I thought the CURLOPT_PROXY was the option but i am not sure if this the correct method.
 
that sounds distinctly dodgy.

in the abstract, i would set the script up as a cron job on each box, with the timers suitably spaced out.
 
Using CURLOPT_PROXY sets up proxy server settings. That won't help you here.

See whether CURLOPT_INTERFACE will do what you want. This should allow you to select which of the already-existing IP addresses on your machine cURL will use as its source IP.



Want the best answers? Ask the best questions! TANSTAAFL!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top