Domain name query with multiple options

Source: Internet
Author: User
Tags query trim domain domain registration
In fact, and do a single domain name query do not have a variety of, gossip does not say, the specific use of recycling query domain name. And I use the Domain name query interface that is not a universal network. Because when the queried domain name is less than 2 bits long, it displays "problematic Domain name: ..." "Hint, it query domain name speed is not ideal, very slow, often pop-up" connection timeout "hint, this may be free to provide the domain name interface for the sake of it, do not know that there is no netizen experience it?

I use www.checkdomain.com to provide domain name query interface, the query speed is very ideal.
First explain
Http://www.checkdomain.com/cgi-bin/checkdomain.pl?domain= is followed by the name of the direct query domain name. For example, to query aa.com, then the URL is http://www.checkdomain.com/cgi-bin/checkdomain.pl?domain=aa.com

Complete in three parts
1.form of content
<form name= "Form1" method= "Post" onsubmit= "Javascript:return Check ()" >
<table width= "height=" border= "0" align= "center" cellpadding= "0" cellspacing= "0" >
&LT;TR class= "TD" >
&LT;TD colspan= "2" > Domain name Query system:</td>
</tr>
&LT;TR class= "TD" >
&LT;TD valign= "Middle" ><div align= "center" >www.
<input name= "DNS" type= "text" id= "DNS" >
</div></td>
<td><input type= "Submit" name= "Submit" value= "Enquiry" ></td>
</tr>
&LT;TR class= "TD" >
&LT;TD colspan= "2" ><p align= "center" >
<input name= "checkbox" type= "checkbox" id= "checkbox" value= "com" checked>
. com
<input type= "checkbox" name= "checkbox" value= "NET" >
. Net
<input type= "checkbox" name= "checkbox" value= "org" >
. org
<input type= "checkbox" name= "checkbox" Value= "CN" >
. CN </p>
<p align= "center" >
<input type= "checkbox" name= "checkbox" value= "com.cn" >
. com.cn
<input type= "checkbox" name= "checkbox" value= "net.cn" >
. net.cn
<input type= "checkbox" name= "checkbox" value= "org.cn" >
. org.cn </p></td>
</tr>
</table>

2. Get the contents of the check box, and turn the array, and then facilitate the loop query domain name
<%
If request. Form ("Submit") = "Query" Then
Types=split (Request.Form ("checkbox"), ",") ' Get the currently selected type
Dns=trim (Request.Form ("DNS"))
For i=0 to UBound (types)
Edns=dns & "." & Trim (types (i))
Url= "http://www.checkdomain.com/cgi-bin/checkdomain.pl?domain=" & Edns
Wstr=gethttppage (URL)
If InStr (LCase (WSTR), "registered") >0 Then
Response.Write "<a href= ' whois.asp?domain=" & Edns & "' target= ' _blank ' >" & Edns & ": Registered </a> <br> "
Else
Response.Write Edns & ": Available domain <br>"
End If
Next
End If
%>
3.whois.asp page
Avoid garbled
Will
Gethttppage=bytestobstr (T, "GB2312")
To
Gethttppage=bytestobstr (T, "Utf-8")

Re-intercept the required domain registration information for the output
....
Wstr=gethttppage (URL)
Wstr=left (Wstr,instrrev (LCase (WSTR), "This domain")-7)
Si=instr (LCase (WSTR), "for you.") +8
Wstr=mid (Wstr,si,len (WSTR))
Response. Write WSTR
...

The above inevitable some mistakes, you are welcome to correct me!
My email: cudng@163.com



Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.