Get Your Site Submitted for Free in the World's Largest B2B Directory!

Email Address:
* URL:
*
*Indicates Mandatory Field

Terms & Conditions

TheDevWeb
FlashNewz
DevWebPro





WhoIs Query With XMLHttp Sample

By Robbe D. Morris
Expert Author
Article Date: 2001-07-31

Here's a quick example of how to use the XMLHttp object to perform a WhoIs query. You can then write your own functiosn to strip out the desired content in the page.

I've added our standard code to prevent ASP page caching for your convenience.

<%

Response.Buffer = True
Response.AddHeader "cache-control", "private"
Response.AddHeader "pragma", "no-cache"
Response.ExpiresAbsolute = #January 1, 1990
00:00:01#
Response.Expires=0


Function WhoIS(sDomain)

Dim oXMLHttp

on error resume next

Set oXMLHttp=Server.CreateObject
("MSXML2.XMLHTTP")


oXMLHttp.open "GET",
"http://www.networksolutions.com/cgi-bin/whois
/whois/?STRING=" & Trim(sDomain), false


oXMLHttp.send

if oXMLHttp.status = 200 Then
WhoIS = oXMLHttp.responseText
else
WhoIs = "0"
end if


Set oXMLHttp = Nothing

End Function

response.write WhoIs("eggheadcafe.com")
%>


About the Author:
Robbe D. Morris http://www.EggheadCafe.com




Newsletter Archive | Article Archive | Submit Article | Advertising Information | About Us | Contact

TheDevWeb is an iEntry, Inc. ® publication - 1998-2008 All Rights Reserved Privacy Policy and Legal