note 39728 added to function.ip2long

From: Date: Mon, 09 Feb 2004 02:51:02 +0000
Subject: note 39728 added to function.ip2long
Groups: php.notes 
Request: Send a blank email to php-notes+get-64854@lists.php.net to get a copy of this message
Doh! That's what I get for copying the wrong code. The correct code is: <?php function ip2base10($ip) { $parts=explode(".",$ip); $base10=($parts[0]<<24)|($parts[1]<<16)|($parts[2]<<8)|($parts[3]); return $base10; } ?> ---- Manual Page -- http://www.php.net/manual/en/function.ip2long.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+39728 Delete -- http://master.php.net/manage/user-notes.php?action=delete+39728&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+39728&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#64854) next »