ReverseDnsLookup
ReverseDnsLookup is used to resolve IP addresses into host names.
Syntax
ReverseDnsLookup(IP)
Returns
String containing the returned hostname.
Example
Very simple dns lookup and reverse lookup:
Function Main
Dim SocketObject As Object
Dim ServerName As String
Dim IP As String
Dim ResolvedName As String
'Carriage return and line feed
cr = Chr(13) + Chr(10)
ServerName = "whois.networksolutions.com"
echo("Resolving"+cr)
Socket.SetTimeout 5000,5000
ip = socket.DnsLookup(ServerName)
echo(ServerName + " resolves to the IP Address:"+cr )
echo(ip +cr)
ResolvedName = Socket.ReverseDnsLookup(ip)
echo(cr)
echo("IP Address "+ip+ " resolves to "+cr)
echo(ResolvedName+cr)
End Function