Displaying Source Code(s)
|
|
Whois Lookup
--------------------------------------------------------------------------------
Description : Shows how you can do a WhoIs lookup using a COM
object capable of using winsock.
<%@ Language=VBScript %>
<H1>Whois Lookup</H1>
<FORM>
<Input Type="text" name="DNS"
value="<%=Request.QueryString("DNS")%>">
<Input Type="submit" value="Lookup">
</FORM>
<HR>
<%
Dim objASPSocks
Dim strResponse
' Goto ServerObjects.com for Eval Versio
' n.
Set objASPSocks = Server.CreateObject("AspSock.Conn")
objAspSocks.RemoteHost = "whois.networksolutions.com"
objAspSocks.Port = 43
objAspSocks.Open
objAspSocks.WriteLn(Request.QueryString("DNS"))
strResponse = objAspSocks.ReadBytesAsString(-1)
objAspSocks.Close
Set objASPSocks = Nothing
Response.Write "<PRE>" & strResponse & "</PRE>"
%>
|
|
|