ReverseDnsLookup
ReverseDnsLookup 用於將 IP 位址解析為主機名稱。
語法
ReverseDnsLookup(IP)
結果
包含傳回的主機名稱的字串。
範例
簡單的 dns 尋找和反向尋找:
Function Main
Dim SocketObject As Object
Dim ServerName As String
Dim IP As String
Dim ResolvedName As String
'歸位字元和換行字元
cr = Chr(13) + Chr(10)
ServerName = "whois.networksolutions.com"
echo("正在解析"+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 位址 "+ip+ " 解析至 "+cr)
echo(ResolvedName+cr)
End Function