Jump to content

Running scripts on different network interfaces


fatherted

Recommended Posts

Hi,

I've written a simple script that retreives a page from a site using get_filecontents.

I have a computer with two differnet network interfaces eth1 (192.168.1.1) and eth0 (192.168.1.2) .

I would like to be able be able to tell the script which interface to use.

e.g
php script.php eth1
php script.php eth0

any suggestions? I can't find any linux command line method of telling it which interface to run the script, and i had a look at sockets but i couldn't see anyway I could pass commands to them , as they seem more suited to client server applications.

many thanks
  • 2 years later...

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.