XML when we are ready to build a Web site, we must apply to the domain name registration authority for an Internet domain name, therefore, we usually want to know whether the domain name we are ready to use has been registered, at this time, you can access the NIC site http://www.nic.net, click " Whois link to enter the domain name you want to query, you can get the results we need.
Whois for. Queries for the international top-level domain names of COM,. NET and. org return all WHOIS data, including domain name registrars, management contracts, contact details (phone, e-mail, address), billing contact, technical support, and domain name information, which is helpful for users to understand a basic situation. In many domain name registrars, there is usually a senior service of whois (domain name query), but the individual cannot provide WHOIS service under general conditions because it does not have the qualification and data of the domain name registrar.
In fact, using the XMLHTTP protocol, each of us can provide domain name details query (WHOIS) service in our own individual, this article describes how to use ASP combined with XMLHTTP programming to achieve this function.
first, the principle
The principle is very simple, domain name query is mainly based on the WHOIS protocol provided by RFC954. In the implementation process, we have our Web access to the NIC site whois, from whois query what we need, and then through the ASP Group Composite Web page back to the client.
At the same time, we use XMLHTTP protocol to achieve the client page without refreshing effect and to the server to retrieve WHOIS data requirements.
The specific process is: the client through XMLHTTP proposed domain name Query request-->web in the ASP listening page to accept the request, use XMLHTTP to send the retrieval command to WHOIS-->whois perform query operations, Return results to our own web (HTML form)-->web after receiving the content, the result is immediately routed to the client-> the client browser uses VBScript to filter out the extra portions of the HTML, picking out the WHOIS data to display.
second, aspxmlhttp programming brief
1. Client HTML page:
<scriptlanguage= "VBScript" >
Subsubmit1_onmouseup ' When the "Query" button is clicked to trigger;
window.status= "Query result: This domain name is already occupied"
Else
Theform.comments.value= "Congratulations, this domain is available!" "
window.status= Query Result: The domain name is still available! "
endif
Else
Theform.comments.value= "Invalid international top-level domain!" Please enter an international domain name ending with (. com.net.org.infoor.biz), such as sun.com "
window.status= "Invalid international top-level domain!" Please enter an international domain name ending with (. com.net.org.infoor.biz), such as cctv.com "
In the above process, we can find that our own web of ASP programs in fact only play a middle transfer, in practical applications, you can omit the middle layer, using VBScript through XMLHTTP directly to the WHOIS to send and receive data. However, this may be because the "access to data resources through (other) domain" in IE is disabled (the default) caused by insufficient permissions to cause the failure to execute, so the method of eliminating ASP middle tier is not very common.
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.