Re: [PHP] How to limit source IP in PHP

2012-09-12 Thread Tonix (Antonio Nati)
Il 12/09/2012 17:52, Tommy Pham ha scritto: On Wed, Sep 12, 2012 at 7:18 AM, Tonix (Antonio Nati) wrote: Il 12/09/2012 16:08, Tommy Pham ha scritto: On Wed, Sep 12, 2012 at 6:53 AM, Tonix (Antonio Nati) wrote: Is there a way to force a PHP script to bind to a prefixed IP? Actually, while y

Re: [PHP] PHP array unions

2012-09-12 Thread Sebastian Krebs
Hi, In PHP the array is in fact a hash map, but especially it is _used_ for nearly everything map-, set-, ...-like thing. So in short: The is no operator or built-in function, that merges two arrays _and_ treat them as set (instead of the hashmap, what they are). Your solution is the way to g

Re: [PHP] How to limit source IP in PHP

2012-09-12 Thread Daniel Brown
On Wed, Sep 12, 2012 at 11:38 AM, Tonix (Antonio Nati) wrote: > > So, the answer is no, PHP is not able to do that. > There is an (heavy) BASEDIR directive for disk, but nothing equivalent (and > simpler) for IP. That's correct. However, that doesn't mean you can't put in a feature request a

Re: [PHP] How to limit source IP in PHP

2012-09-12 Thread Tommy Pham
On Wed, Sep 12, 2012 at 7:18 AM, Tonix (Antonio Nati) wrote: > Il 12/09/2012 16:08, Tommy Pham ha scritto: > >> On Wed, Sep 12, 2012 at 6:53 AM, Tonix (Antonio Nati) >> wrote: >>> >>> Is there a way to force a PHP script to bind to a prefixed IP? >>> >>> Actually, while you can assign more IPs to

Re: [PHP] How to limit source IP in PHP

2012-09-12 Thread Tonix (Antonio Nati)
Il 12/09/2012 17:21, Daniel Brown ha scritto: On Wed, Sep 12, 2012 at 10:18 AM, Tonix (Antonio Nati) 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 underlyin

Re: [PHP] How to limit source IP in PHP

2012-09-12 Thread Daniel Brown
On Wed, Sep 12, 2012 at 10:18 AM, Tonix (Antonio Nati) 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 ha

Re: [PHP] How to limit source IP in PHP

2012-09-12 Thread Tonix (Antonio Nati)
Il 12/09/2012 16:08, Tommy Pham ha scritto: On Wed, Sep 12, 2012 at 6:53 AM, Tonix (Antonio Nati) wrote: Is there a way to force a PHP script to bind to a prefixed IP? Actually, while you can assign more IPs to Apache for listening, assigning domains to specific IPs, it looks like any PHP scri

Re: [PHP] How to limit source IP in PHP

2012-09-12 Thread Tommy Pham
On Wed, Sep 12, 2012 at 6:53 AM, Tonix (Antonio Nati) wrote: > > Is there a way to force a PHP script to bind to a prefixed IP? > > Actually, while you can assign more IPs to Apache for listening, assigning > domains to specific IPs, it looks like any PHP script can freely choose > which IP to bin

[PHP] How to limit source IP in PHP

2012-09-12 Thread Tonix (Antonio Nati)
Is there a way to force a PHP script to bind to a prefixed IP? Actually, while you can assign more IPs to Apache for listening, assigning domains to specific IPs, it looks like any PHP script can freely choose which IP to bind. Instead I'd love some domains are permitted to open connections o