I have multiple IP's on my public CentOS box, and can make requests via all of them using PHP / cURL in the form
curl_setopt($ch, CURLOPT_INTERFACE, "xxx.xxx.xxx.xxx");
However, I want to pass in the relevant IP dynamically. When I try in the form:
curl_setopt($ch, CURLOPT_INTERFACE, $currentIP);
Where $currentIP contains the IP address (xxx.xxx.xxx.xxx) it fails.