Re: [PHP] 0.0.0.0 & iplong()

2012-06-05 Thread Matijn Woudt
On Tue, Jun 5, 2012 at 1:49 PM, jas wrote: > > > As stated previously using CIDR notation such as 192.168.0.0/24, 10.0.0.0/24 > perform validation on an IP existing within said subnet range. > > visiting ip: 192.168.0.22 > > acl allow range: 192.168.0.0/24 > acl deny range: 0.0.0.0/24 > > CIDR no

Re: [PHP] 0.0.0.0 & iplong()

2012-06-05 Thread Chris Knipe
> acl allow range: 192.168.0.0/24 > acl deny range: 0.0.0.0/24 > > CIDR notation allows me to utilize shorthand notation for specifying a range > of IP's > > In those two cases any ip within 192.168.0.0 - 192.168.0.255 is allowed > while anything else residing between 0.0.0.0 - 255.255.255.255 is d

Re: [PHP] 0.0.0.0 & iplong()

2012-06-05 Thread jas
On 06/05/2012 05:40 AM, Matijn Woudt wrote: On Tue, Jun 5, 2012 at 1:07 PM, jas wrote: On 06/04/2012 12:48 PM, Matijn Woudt wrote: On Mon, Jun 4, 2012 at 8:38 PM, jaswrote: On 06/04/2012 11:33 AM, Matijn Woudt wrote: On Mon, Jun 4, 2012 at 6:54 PM, jas wrote: Not sure if this

Re: [PHP] 0.0.0.0 & iplong()

2012-06-05 Thread Matijn Woudt
On Tue, Jun 5, 2012 at 1:07 PM, jas wrote: > On 06/04/2012 12:48 PM, Matijn Woudt wrote: >> >> On Mon, Jun 4, 2012 at 8:38 PM, jas  wrote: >>> >>> On 06/04/2012 11:33 AM, Matijn Woudt wrote: On Mon, Jun 4, 2012 at 6:54 PM, jas    wrote: > > > Not sure if this is a bug or

Re: [PHP] 0.0.0.0 & iplong()

2012-06-05 Thread jas
On 06/04/2012 12:48 PM, Matijn Woudt wrote: On Mon, Jun 4, 2012 at 8:38 PM, jas wrote: On 06/04/2012 11:33 AM, Matijn Woudt wrote: On Mon, Jun 4, 2012 at 6:54 PM, jaswrote: Not sure if this is a bug or not... I have run into an error when performing a conditional using iplong() and the

Re: [PHP] 0.0.0.0 & iplong()

2012-06-04 Thread Matijn Woudt
On Mon, Jun 4, 2012 at 8:38 PM, jas wrote: > On 06/04/2012 11:33 AM, Matijn Woudt wrote: >> >> On Mon, Jun 4, 2012 at 6:54 PM, jas  wrote: >>> >>> Not sure if this is a bug or not... >>> >>> I have run into an error when performing a conditional using iplong() and >>> the ~ bitwise operator >>> >>

Re: [PHP] 0.0.0.0 & iplong()

2012-06-04 Thread jas
On 06/04/2012 11:33 AM, Matijn Woudt wrote: On Mon, Jun 4, 2012 at 6:54 PM, jas wrote: Not sure if this is a bug or not... I have run into an error when performing a conditional using iplong() and the ~ bitwise operator $ip = '0.0.0.0'; $mask = '24'; $end = (ip2long($ip) || (~ip2long($mask))

Re: [PHP] 0.0.0.0 & iplong()

2012-06-04 Thread Matijn Woudt
On Mon, Jun 4, 2012 at 6:54 PM, jas wrote: > Not sure if this is a bug or not... > > I have run into an error when performing a conditional using iplong() and > the ~ bitwise operator > > $ip = '0.0.0.0'; > $mask = '24'; > > $end = (ip2long($ip) || (~ip2long($mask))) + 1; > > PHP Fatal error:  Uns

[PHP] 0.0.0.0 & iplong()

2012-06-04 Thread jas
Not sure if this is a bug or not... I have run into an error when performing a conditional using iplong() and the ~ bitwise operator $ip = '0.0.0.0'; $mask = '24'; $end = (ip2long($ip) || (~ip2long($mask))) + 1; PHP Fatal error: Unsupported operand types I even tried to typecast the mask t