| GetHostByIP | Retrieves the host information corresponding to a network address. | |
| GetIPByHost | Retrieves the IP address corresponding to a host name. |
| ||
Set DNS = CreateObject("TCPIP.DNS")
On Error Resume Next
ip = DNS.GetIPByHost("www.microsoft.com")
host = DNS.GetHostByIP(ip)
If Err <> 0 Then
'some dns error - host not found, ...
End If
On Error Goto 0 |
| ||
Set DNS = CreateObject("TCPIP.DNS")
On Error Resume Next
host = DNS.GetHostByIP(Request.ServerVariables("REMOTE_ADDR"))
If Err <> 0 Then
'some dns error - host not found, ...
End If
On Error Goto 0 |