Page 1 of 1

How 2 use different ethernet adapters for php ? ( diff ip's)

Posted: Mon Apr 10, 2006 11:33 am
by Deseree
Does anyone know how I can use different ip's I binded to my server in php but not use curl_int, I've tried that and POSTING to xml rpc doesn't work with curl_int, i tried, it xmlrpc posts just finewithout using

curl_setopt ($ch, CURLOPT_INTERFACE, $interface_eth);

that one breaks my curl xmlrpc posting..... so i need to know how to use fgets WITH different ip's binded .....

thanks

Posted: Mon Apr 10, 2006 12:51 pm
by Christopher
Because they are on the same server there may be other solutions. What is the data you want to share?

Posted: Mon Apr 10, 2006 9:46 pm
by Deseree
it's a php script that posts xmlrpc posts that I prefer to run in shell rather than over http:// . It works from different ip's when I run THROUGH apache, but I want to run 100% free of apache ( since apache seems to crash when I run it since it goes for hours ), and when I run the script from shell, it ALWAYS uses the main server's ip.....

Posted: Tue Apr 11, 2006 12:34 am
by Christopher
Maybe just use exec() to run it.

Posted: Tue Apr 11, 2006 1:21 am
by Deseree
arborint wrote:Maybe just use exec() to run it.
but HOW do I select which INTERFACE or ETH0 it will use?

I have 31 ip's on my server....

eth0
eth0:1
eth0:2
eth0:3
eth0:4
eth0:5
.
.
.
eth0:28
eth0:29
eth0:30


I need to be able to select which one it uses..... lol, did you not catch that part or am I missing something with exec(), i've used it before but i don't see how to select which eth to use...