note 34747 deleted from function.ip2long by didou
| From: | didou@php.net | Date: | Tue, 05 Aug 2003 19:05:01 +0000 |
| Subject: | note 34747 deleted from function.ip2long by didou | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-53446@lists.php.net to get a copy of this message | ||
Note Submitter: Gavin Liquorish
----
The reason 192.168.0.2 appears to fail is because of the top bit being used for the sign in the int
type.
It will fail for any address above 127.255.255.255.
You can use the result as is for comparison checks but you need to use sprintf as detailed above if
you want to do anything else with the number ie store in a DB.
Regards