Hi, I was wondering if anyone could help. I've got a linux server with virtual hosts set up with separate ips and domain names on apache2. Everything works fine for incoming requests, but when I send an outgoing call (using curl php but am willing to change if necessary) the ip address received by the target is the server's primary ip address. I need it to show that it's from the ip address that has been set to the virtual host where the php page is located. Any help would be appreciated. Thanks, Lee
I don't know of a good way to auto detect it (aside from manually parsing server output) but you could use the --interface option of cURL to have it use a specific interface: curl --interface eth0 http://www.google.com Code (markup):
Hi, Many thanks. That's great. That's just what I was looking for. I should have known but I've never had to do this before. Your instructions led me use the php command curl_setopt ($ch, CURLOPT_INTERFACE, "eth0:0"); Simple as that. Many thanks again, I really needed this. Lee