Domain name query with multiple options (ASP)

Source: Internet
Author: User
Tags domain name registration

Haha, the first post on ASP is published on my blog. I don't know if the code is working now. If you are interested, please try it.

Main steps:
1. Find the query interface.
2. Loop Query
3. Filter (intercept) Information

In fact, it is no different from doing a single domain name query. I will not talk about it, but simply use recycling to query domain names. I also use domain name query interfaces that are not provided by hichina. because when the length of the domain name to be queried is less than two characters, it will display "problematic Domain Name :... "prompt: the speed of domain name query is not ideal, slow, and the" connection timeout "prompt is often displayed. This may be because the Domain Name Interface is provided for free, I don't know if anyone has experienced it?

I use www.checkdomain.com to provide the domain name query interface. The query speed is quite satisfactory.
Description
Http://www.checkdomain.com/cgi-bin/checkdomain.pl? Domain = is followed by a direct query of the domain name. For example to query aa.com, then the URL is the http://www.checkdomain.com/cgi-bin/checkdomain.pl? Domain = aa.com

Completed in three parts
1. Form Content
<Form name = "form1" method = "Post" onsubmit = "javascript: Return check ()">
<Table width = "400" Height = "150" border = "0" align = "center" cellpadding = "0" cellspacing = "0">
<Tr class = "TD">
<TD colspan = "2"> domain name query system: </TD>
</Tr>
<Tr class = "TD">
<TD valign = "Middle"> <Div align = "center"> www.
<Input name = "DNS" type = "text" id = "DNS">
</Div> </TD>
<TD> <input type = "Submit" name = "Submit" value = "query"> </TD>
</Tr>
<Tr class = "TD">
<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 content of the check box, convert it to an array, and then query the domain name cyclically.
<%
If request. Form ("Submit") = "query" then
Types = Split (request. Form ("checkbox"), ",") 'Get the 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 name <br>"
End if
Next
End if
%>
3. Whois. ASP page
Avoid garbled characters
Set
Gethttppage = bytestobstr (T, "gb2312 ")
Change
Gethttppage = bytestobstr (T, "UTF-8 ")

Capture the required domain name registration information
....
Wstr = gethttppage (URL)
Wstr = left (wstr, limit Rev (lcase (wstr), "this domain")-7)
SI = instr (lcase (wstr), "For you.") + 8
Wstr = mid (wstr, Si, Len (wstr ))
Response. Write wstr
...

Some errors are inevitable. please correct me!
My mailbox: cudng@163.com

 

Related Article

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.