RE: [PHP] I.P. range authentication

From: Date: Wed, 19 Mar 2003 10:11:20 +0000
Subject: RE: [PHP] I.P. range authentication
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-140265@lists.php.net to get a copy of this message
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/

« previous php.general (#140265) next »