stijnvb Posted February 12, 2011 Share Posted February 12, 2011 Hi, I have a PHP script which I want to run from a different IP on my server. Example of what I want to do: My main ip: 4.5.6.7 Have several IP's on server. I want my PHP script (running from CLI) to use cURL with another IP, ay 4.5.6.9 Is this possible to do? Help would be greatly appreciated! Quote Link to comment Share on other sites More sharing options...
stijnvb Posted February 12, 2011 Author Share Posted February 12, 2011 The solution was kinda simple :-) curl_setopt($ch, CURLOPT_INTERFACE, "69.xxx.xxx.171"); did the trick Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.