At 02:51 19.03.2003, John W. Holmes said:
--------------------[snip]--------------------
>> $abytes = explode('.', $ip); // explode the IP string
>> $ip = 0;
>> foreach ($abytes as $byte) $ip = ($ip << 8) + $byte;
>>
>> This will give you the valid numeric equivalent of the IP address.
>
>Isn't that what ip2long() does?
>
>Also, the man page on ip2long() has some good notes and code that may
>help the OP.
>
>http://www.php.net/manual/en/function.ip2long.php
--------------------[snip]--------------------
Thanks - didn't come around this function yet...
--
>O Ernest E. Vogelsinger
(\) ICQ #13394035
^ http://www.vogelsinger.at/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php