note 10497 deleted from function.ip2long by jimw

From: Date: Sat, 03 Nov 2001 18:42:40 +0000
Subject: note 10497 deleted from function.ip2long by jimw
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-20393@lists.php.net to get a copy of this message
I've found, that the function returns the integer in a signed format. That isn't applicable, if you want to use the number in an url, such: http://3232261145/index.php This is often used to fake site-urls ;-) To convert to unsigned long, use the following work around: $l = ip2long($ip); if($l < 0) $l += pow(2,32); $l ist than an unsigned integer.

« previous php.notes (#20393) next »