Add domain name query function using XMLHTTP for website

zhaozj2021-02-16  99

When we are ready to establish a Web site, we must apply for an Internet domain name to the domain name registration agency. Therefore, we usually want to know if you are ready to use, if you have already registered, then you can access the NIC site http: //www.nic .NET, click on the "Whois" link After entering the domain name you need to query, you can get the results we need.

The WHOIS server returns all WHOIS data for the international top domain name of .com, .net and .org, the WHOIS data, including site domain registrant, management contract, contact information (telephone, email, address), billing, technical support and Domain name server information is very helpful for users' understanding of a website. In many domain name registered service providers, there are usually high-level services for WHOIS (domain name query), but personal websites are unable to provide WHOIS services under normal conditions because they do not have domain name registered service providers.

In fact, using the XMLHTTP protocol, each of us can provide domain name details in our own personal website, this article describes how to use ASP to combine XMLHTTP programming to implement this feature.

I. Principle: The principle is very simple, the query of the domain name is primarily based on the WHOIS protocol provided by RFC 954. During the implementation, we have access to the Whois database server of the NIC site through its own web server, query the content we need from the Whois database, and then send it to the client via the ASP. At the same time, we use the XMLHTTP protocol to implement the client web pageless effect and retrieve the requirements of WHOIS data to the server. The specific process is: the client uses XMLHTTTTTTT-> the ASP listening page in the web server to send a retrieval command to the WHOIS server after using XMLHTTTTTT-> WEB Server, send the search command to the WHOIS server, return the result to our own web When the server (HTML form) -> web server receives the content, the result is transferred to the client -> Client browser uses VBScript to filter out the HTML extra part, picking out the WHOIS data displayed.

Second, ASP XMLHTTP programming brief description: 1. Client HTML page: