[nycphp-talk] I need a function that will compare IP addresses

Hans Zaunere hans at
Mon Aug 18 12:48:20 EDT 2003

Phil Powell wrote:

>  have written a function that is supposed to compare the first three 
> nodes of an IP address, but it is riddled with errors that I have given 
> up trying to figure out.
> Is there an existing function out there that can do this? I want to 
> compare "" with "" and come with as a "match", or 
> "" with "", but no "match if "" and 
> "".

IPs are really just long ints.

This should take care of things:


More information about the talk mailing list