>I don't know how to do this offhand, but you can convert IP addresses to
>a single big integer number. What you could do is figure out the start
>IP and end IP numbers, then do a simple FOR loop. For each loop
>iteration, you could take that number and convert it back to an IP
>address and check it. Not 100% how that would work, but maybe this can
>point you in a good direction.

You can convert an IP address to a numeric value using:

(A * (256 ^ 3)) + (B * (256 ^ 2)) + (C  * 256) + D = numeric IP

So to calculate the IP Address 192.168.0.1, you'd use the following formula:

(192 * 16777216) + (168 * 65536) + (0 * 256) + 1 
  3221225472     +    11010048   +     0     + 1

http://www.aboutmyip.com/AboutMyXApp/IP2Integer.jsp

-Dan


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Create robust enterprise, web RIAs.
Upgrade to ColdFusion 8 and integrate with Adobe Flex
http://www.adobe.com/products/coldfusion/flex2/?sdid=RVJP

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:292660
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to