LookupHost

The LookupHost function performs host name lookup by its IP address or host address lookup by its internet name.

LookupHost name_addr

Parameters

name_addr
Specifies the host IP address as string like "xxx.xxx.xxx.xxx" or host internet name (fully qualified, with domain name).

Return value

If successful, the function returns host internet name or IP address. If error occured, the empty string is returned. To understand the reason of error you can use the LastError property.

Example

<%
Set tcpip=CreateObject("SHOTIP.Connection")

a=tcpip.LookupHost("www.microsoft.com")
if a<>"" then
	Response.Write "Host address is "&a
else
	Response.Write "Error occured!"
end if
%>