Hi,
I have an asp page that looks up domain names to see if they are available for purchase.
I am using Microsoft.XMLHTTP for the purpose (see below some sample code)
Unfortunately, the above code does not return the correct results, for instance with some domains, it shows has available when in fact it is not available for purchase.
Has anyone experienced similar problems using this method for checking domain availability? Or perhaps a better method could be used.
Any help on this would be much appreciated.
Platform:
OS: Windows 2003 Server - Web Edition
IIS: Version 6.0
Thanks
Dabase
I have an asp page that looks up domain names to see if they are available for purchase.
I am using Microsoft.XMLHTTP for the purpose (see below some sample code)
Code:
Dim sDomain, sDomainFlag
sDomain = strDomainName & "." & arrTLDs(1,i)
' Introduce the url you want to visit
GotothisURL = "[URL unfurl="true"]http://www."[/URL] & sDomain
' Create the xml object
Set GetConnection = CreateObject("Microsoft.XMLHTTP")
' Connect to specified URL
GetConnection.Open "get", GotothisURL, False
on error resume next
GetConnection.Send
' ResponsePage is the response, then print it out to the page
ResponsePage = GetConnection.getResponseHeader("Date")
' Write response
if ResponsePage="" then
' Available
sDomainFlag = "1"
else
' Not Available
sDomainFlag = "2"
end if
Unfortunately, the above code does not return the correct results, for instance with some domains, it shows has available when in fact it is not available for purchase.
Has anyone experienced similar problems using this method for checking domain availability? Or perhaps a better method could be used.
Any help on this would be much appreciated.
Platform:
OS: Windows 2003 Server - Web Edition
IIS: Version 6.0
Thanks
Dabase