Re: How to limit source IP in PHP
| From: | Jim Lucas | Date: | Fri, 14 Sep 2012 19:18:16 +0000 |
| Subject: | Re: How to limit source IP in PHP | ||
| References: | 1 2 3 4 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-319087@lists.php.net to get a copy of this message | ||
On 09/12/2012 08:21 AM, Daniel Brown wrote:
On Wed, Sep 12, 2012 at 10:18 AM, Tonix (Antonio Nati) <tonix@interazioni.it> wrote: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/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 underlyingsoftware, 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).