Re: IP address extraction

by "Kae Verens" <kverens(at)orbism.com>

 Date:  Fri, 6 Oct 2000 08:05:48 +0100
 To:  "Srinivasan Ramakrishnan" <srinivar(at)md3.vsnl.net.in>,
<hwg-languages(at)hwg.org>
 References:  srinivarmd3
  todo: View Thread, Original

----- Original Message -----
From: "Srinivasan Ramakrishnan" <srinivar(at)md3.vsnl.net.in>
To: <hwg-languages(at)hwg.org>
Sent: Friday, October 06, 2000 1:50 AM
Subject: IP address extraction


> I know this has been discussed before, but I'm not sure if I can remember,
> so if someone has the time, how does http://1234567890123 map to
> http://113.251.4.203

the rightmost number + the next to the left * 256 + the next to the left *
(256^2) + the leftmost * (256^3)

            203=       203
          4*256=      1024+
    251*256*256=  16449536+
113*256*256*256=1925828408+
                ==========
                1942279161

my maths may be off

Kae

HWG: hwg-languages mailing list archives, maintained by Webmasters @ IWA