Public Function IsLocalIP( _
ByVal strIP As String) As Boolean
Dim barIP(1 To 4) As Byte
barIP(1) = GetTok(strIP, 1, 46)
barIP(2) = GetTok(strIP, 2, 46)
barIP(3) = GetTok(strIP, 3, 46)
barIP(4) = GetTok(strIP, 4, 46)
If barIP(1) = 10 Then
IsLocalIP = True
Exit Function
End If
If barIP(1) = 172 And (barIP(2) >= 16 And barIP(2) <= 31) Then
IsLocalIP = True
Exit Function
End If
If barIP(1) = 192 And barIP(2) = 168 Then
IsLocalIP = True
Exit Function
End If
If barIP(1) = 169 And barIP(2) = 254 Then
IsLocalIP = True
Exit Function
End If
End Function