Re: How to limit source IP in PHP

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 09/12/2012 08:21 AM, Daniel Brown wrote:
On Wed, Sep 12, 2012 at 10:18 AM, Tonix (Antonio Nati)
<tonix@xxxxxxxxxxxxxx>  wrote:

Is PHP able to 'force' binding IP? I hoped there was an external directive I
did not see, but probably this is a PHP lack.

     Not at all.  Essentially, PHP is an interface to underlying
software, OS commands, and APIs.  You'd have to configure the system
to bind requests, as PHP does not presently have that capability (and,
to my knowledge, there's no plan to change that).


Daniel,

Correct me if I wrong, but you could use the stream_* functions within a process running as a daemon that can listen on a given IP:port . I do this on my php scripts right now.

It accepts, processes, and responds to the client connections without the need of any other applications. And, it responds to the client from the IP & PORT that the client made the connection to.

--
Jim Lucas

http://www.cmsws.com/
http://www.cmsws.com/examples/

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



[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux