Re: error in ip2long
| From: | (Chris Adams) | Date: | Thu, 17 May 2001 04:37:25 +0000 |
| Subject: | Re: error in ip2long | ||
| References: | 1 | Groups: | php.windows |
| Request: | Send a blank email to php-windows+get-7659@lists.php.net to get a copy of this message | ||
On 16 May 2001 19:56:52 -0700, Ruslan Ohitin <rus@bagan.ru> wrote:
> hello all!
>
> I try to convert ip address (aaa.bbb.ccc.ddd)
> to IPv4 integer using ip2long().
>
> ip2long("200.200.200.12") = 3368601612
> but it must be -926365684.
That's the same value - the first time is treating it as an unsigned integer,
the second as a signed integer.
Chris