Click to See Complete Forum and Search --> : Domain availability checker


haan86
09-10-2009, 02:58 AM
hi..
I am doing domain name checker..
Below is the code of tutorial I get from internet.
But the result always return not available...
Who know what is the problems?

Thanks you...

<% Dim strURL: strURL = "http://www.7788.com"
Dim objXMLConn, strResponse

Set objXMLConn = Server.CreateObject("Microsoft.XMLHTTP")
objXMLConn.Open "get", strURL, False

'| Compensate for errors with this line.
On Error Resume Next
GetConnection.Send

strResponse = objXMLConn.getResponseHeader("Date")

If Not IsEmpty(strResponse) Then
Response.write(strURL & " is available")
Else
Response.write(strURL & " is not available")
End If

Set objXMLConn = Nothing %>

Between, to add a domain availability checker to my site is that very hard and required high skill of programming? Because I am fresh in programing, still under training..
Thanks for reply... :)

Kuriyama
09-13-2009, 11:05 PM
The XMLHTTP object will not act as a domain checker. All that does is allow vbscript to process a http request behind the scenes. Date will never be empty even if the request returns 404.

Try checking for 200 status and make sure the host is is the domain that you are trying to check.