Check domain name availability

We will try to get to main page of a domain name we want to search for availability and we will request for "date" in headers (it is not necessary to request the entire page). Possible situations are:

  • We get a response to our request, so the domain name is taken.
  • We are anable to get a response to our request, so the domain name may be availbale (is not necessarely available: the server may be down, not accesible, or DNS entries are incorrect)
The script includes a form.
 
DomainAvailability.asp        
<%
If request.form("domain")<>"" then

 ' Intruduce the url you want to visit
 GotothisURL = "http://www." & request.form("domain")

 ' Create the xml object
 Set GetConnection = CreateObject("Microsoft.XMLHTTP")
 ' Conect 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 
Response.write("This domain name may be available")
else
Response.write("This domain name is taken")
end if

Set GetConnection = Nothing

else
%>
<form method=post action=<% =request.servervariables("URL") %>>
<input type=text name=domain size=15 value="domain.com">
<input type=submit value="Find domain name">
</form>
<% end if %>










   



MSN Nick Name



More Resources...





Most Viewed Services:
  1. HTML Tutorial
  2. XHTML Tutorial
  3. CSS Tutorial
  4. Javascript Tutorial
  5. DHTML Tutorial
  6. VB Script
  7. TCP/IP Tutorial
  8. ADO Tutorial
  9. MYSQL Tutorial
  10. ASP Tutorial
  11. AJAX Tutorial
  12. CFML Tutorial
  13. PHP Tutorial
  14. WML Tutorial
  15. FLASH Tutorial
  16. XML Tutorial
  17. RSS Tutorial
  18. SQL Tutorial
  19. HTML Articles
  1. Javascript Articles
  2. PHP Articles
  3. SEO Articles
  4. Web Design Articles
  5. SEO Tips
  6. Web Design Tips
  7. Articles
  8. CSS
  9. CSS Tips
  10. HTML Tips
  11. JAVASCRIPT Tips
  12. MYSQL Tips
  13. PHP Tips
  14. Money
  15. Tutorials
  16. Web Hosting



  • Home
  • Web Directory
  • Top Directoriers
  • Webmaster Directories
  • Contact
  • © Copyright 2006-2010 All Rights Reserved By CodeDcode.Com : HTML : RSS : TEXT : XML