note 9911 added to ip2long
| From: | jlapier at stny dot rr dot com | Date: | Thu, 30 Nov 2000 18:43:58 +0000 |
| Subject: | note 9911 added to ip2long | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-8302@lists.php.net to get a copy of this message | ||
Has anyone gotten this to work in PHP4? Using 4.0.3pl1, I always get a negative number from this
function - even using the example code provided. It converts www.php.net into -789091653. I tried to
recreate this function manually using decbin() and bindec(), but I get the same results. I think it
has to do with bindec() being limited to 31 bits (I believe an IP address is 32...)
Any thoughts? Anyone?
http://www.php.net/manual/function.ip2long.php