----- Original Message -----
To: "Charles Williams" <[EMAIL PROTECTED]>
Cc: "Php-General (E-mail)" <[EMAIL PROTECTED]>
Sent: Monday, March 18, 2002 10:12 PM
Subject: Re: [PHP] Working with IP addresses

> On Mon, 18 Mar 2002, Charles Williams wrote:
> > There will be a form with a text box to allow IP address entries as
> >
> >
> > or
> >
> > or
> >
> > or
> >
> >
> > The above a just a few examples.  I need to be able to grab either the
> > addresses or the ranges and verify that when an IP is entered at a later
> > date and compared to the above types of previously saved data that the
IP is
> > within the range(s).
> >
> > I hope I explained that ok. ;)
> >
> > So basically I guess I just need a way of, after retrieving the info
> > the DB, splitting the IP (range(s)) apart and then comparing the IP
> > to those in the array(?) to verify that it was a good entry.
> It's not exactly clear to me what your question is.
> But, as to the general question of representing and comparing IP addresses
> internally, I guess first you'd want to pick a representation that
> efficiently and flexibly captures the values you expect to work with.
> Ordinarily I would suggest CIDR subnets but the sample IP addresses you
> provided do not comply - they seem to be random numbers. Is this because
> you need to deal with arbitrary sets of IP addresses rather than valid
> subnets, or because you were just in a hurry while typing your message to
> the list?
> Also, I wouldn't recommend using the slash to identify ranges of IP
> addresses, because the slash already has a specific meaning in this
> context: the number after it specifies the size of the subnet mask. For
> instance, to refer to the range, you'd write

Sorry.  forgot about the cisco standard thing there when I typed it all up.
hehe.  been a long day.

Anyway.  the IP addresses provided were just arbitrary addresses to show the
format to be used.

of course the /xx (cisco method) will be used and the IP-IP format will be
used for a range as well.

thanks for any help.

> Anyway, I have a few ideas in mind but with an answer to the above
> question I'd be able to give you what may be an optimal representation and
> methodology.
> miguel
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php

PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to