>>Michel here you can find a list and is free
http://ip-to-country.webhosting.info/node/view/6?XID=ac5319a5b0f784fd20d189d289325993>
>Thanks, I downloaded the file. Excel recognizes it. When I open it in there, I see a comma delimited format. However, there is no dot. I wonder how someone would be able to know what IP is it exactly.
The formula to convert an IP Address of the form A.B.C.D to an IP Number is:
IP Number = A x (256*256*256) + B x (256*256) + C x 256 + D
so in vb.net will be something like
Function Ip2Number(ByVal ipAddress As String) As Long
Dim str As String() = ipAddress.Split(CChar("."))
Return CLng(CInt(str(0)) * 16777216 + CInt(str(1)) * 65536 + CInt(str(2)) * 256 + CInt(str(3)))
End Function
this is the condense version ;)
Alexandre Palma
Senior Application Architect