Classic ASP
Classic ASP
DNS Lookup
Do a DNS lookup to resolve a hostname to an IP address.Chilkat Classic ASP Downloads
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body>
<%
' This example requires the Chilkat API to have been previously unlocked.
' See Global Unlock Sample for sample code.
set socket = Server.CreateObject("Chilkat.Socket")
maxWaitMs = 10000
ipAddr = socket.DnsLookup("www.chilkatsoft.com",maxWaitMs)
If (socket.LastMethodSuccess <> 1) Then
Response.Write "<pre>" & Server.HTMLEncode( socket.LastErrorText) & "</pre>"
Response.End
End If
Response.Write "<pre>" & Server.HTMLEncode( "IP Address: " & ipAddr) & "</pre>"
%>
</body>
</html>