|
Posted by Jerry Stuckle on July 6, 2008, 3:09 pm
Please log in for more thread options axlq wrote:
>> On Jul 5, 9:40 pm, a...@spamcop.net (axlq) wrote:
>>> After failing to find this in my searches, I thought I'd ask
>>> here: Is there a php function that can tell me if an IP address
>>> falls within a range?
>
>> Function parameters should be like this:
>> ip_func($_SERVER['REMOTE_ADDR'],<IP TO START>,<IP TO STOP>);
>>
>> Ex. ip_func($_SERVER['REMOTE_ADDR'] , 78.157.128.0 , 78.157.128.255 );
>
> Oh, that's right. If I passed the second two arguments as strings,
> I could simply use lexical comparison to determine if the first
> argument is between them.
>
> Thanks.
> -A
>
Is 101.01.01.01 within the range of 98.98.98.98 and 110.110.110.110?
Passed as a string, it is not.
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================
|