Public Function Dot2LongIP(ByVal DottedIP As String) As Double
Dim arrDec() As String
Dim i As Integer
Dim intResult As Long
If DottedIP = "" then
Dot2LongIP = 0
Else
arrDec = DottedIP.Split(".")
For i = arrDec.Length - 1 To 0 Step -1
intResult = intResult + ((Int(arrDec(i)) Mod 256) * Math.Pow(256, 3 -i))
Next
Dot2LongIP = intResult
End If
End Function
VB.NET Function To Convert IP Address to IP Number
01 January 2001 in Tips-Tricks-Hacks, Tips: Webmaster
0 comments:
Post a Comment Subscribe to Post Comments (Atom)