On 09/13/2012 12:28 PM, Tonix (Antonio Nati) wrote:

You are speaking about incoming connections, I suppose.

I'm speaking about connections started from within PHP.

Which is a response to the incoming connection.

Unless you are talking about PHP being ran from cron or the CLI.

if you are talking about YOU running a PHP script as a daemon, then yes, you have the ability to BIND to an IP address. I do this in a few scripts/daemons of mine. I use the stream_* functions for this.

But, if you are talking about calling fopen() from the CLI and have it "bind" to a specific IP when connecting out, that is more of a OS specific option. You will need to find out how to run a php script and have it "bind" to a given IP (or interface) when it connects to the WWW.

Hope this helps.




Jim Lucas


PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to