' Get the IP addresses for a given domain name
Private Function GetAllIPAddresses(ByVal domainName As String) _
As System.Collections.Specialized.StringCollection
Dim results As New System.Collections.Specialized.StringCollection
Dim hostInfo As System.Net.IPHostEntry = System.Net.Dns.GetHostByName(domainName)
For Each ip As System.Net.IPAddress In hostInfo.AddressList
results.Add(ip.ToString)
Next
Return results
End Function
No comments:
Post a Comment