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! Link to comment https://forums.phpfreaks.com/topic/227465-running-php-script-from-other-ip/ 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 Link to comment https://forums.phpfreaks.com/topic/227465-running-php-script-from-other-ip/#findComment-1173270 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.