Click here to return to Newclient Main Help Page


Back


Last Updated: July 19, 1998

InterNIC Database Query

A very nice addition to the web site of a company which specializes in web hosting is an InterNIC Database Query. A small form and simple CGI can be designed to facilitate such a task. The query form and CGI source are presented in two sections below.

  1. The HTML source for the query form
  2. Installing the CGI source code


HTML Source for the Query Form

The HTML source below represents a simple query form. This form can be customized for your Virtual Server by adding graphics, changing text, and adding other personal touches.

<html> 
<head> 
<title>InterNIC Database Query</title> 
</head> 
<body> 
<hr size = 3> 
<h3>InterNIC Database Query</h3> 
Use the following form to perform a query exclusively on the 
<a href="http://rs.internic.net">InterNIC</a> 
database (which includes the ".com", ".net", and ".org" 
top level domain names). Not only can you determine 
whether a domain name you desire is already in use, 
but you can find contact names, e-mail addresses, 
postal addresses, and telephone numbers. 
Simply enter the appropriate identifier 
(such as a domain name, NIC handle, etc) in the 
entry field below and select the "Query" button. 
<p> 
<center> 
<form method=POST action="/cgi-bin/library/whois/query.pl"> 
<input name="name" size=24 maxlength=72> 
<input type="submit" value="Query"> 
</form> 
</center> 
<p> 
The default action (unless directed otherwise by 
entering a specific domain name or NIC handle), 
is to do a very broad search, looking for matches 
in all types of records and most fields (name, 
nickname, hostname, net address, etc) in the database. 
For more information, enter "help" in the entry field 
above and select the "Query" button or check out the 
<a href="http://rs.internic.net/tools/whois.html">
Whois help page</a> maintained by InterNIC. 
<p> 
<hr size = 3> 
</body> 
</html> 

If you are unfamiliar with the FORM HTML element, or would like to learn more about forms, the following URL is an excellent resource:

http://www.ncsa.uiuc.edu/SDG/Software/Mosaic/Docs/fill-out-forms/overview.html


How to Install the Query CGI

To install the query CGI on your Virtual Server you will need to do the following:

  1. Download the Query Form
    You will need to download the Query Form HTML source and store it somewhere in your "usr/local/etc/httpd/htdocs" directory structure. Feel free to customize the form, add graphics, etc. But be sure that the variable name for the input field is not altered.

  2. Untar the InterNIC Database Query CGI source code
    1. telnet or SSH to your Virtual Server.
    2. change directories to your home directory (type "cd" and hit return)
    3. type "tar -xvf /usr/local/contrib/whois.tar"
      This will install the query.pl and util.pl files into your "www/cgi-bin/library/whois" directory.

  3. Customize the Appearance of the Query CGI
    Two subroutines in the util.pl file are used to print out header and footer information. These functions are print_header_info and print_footer_info. Feel free to modify these functions such that the CGI outputs pages that are in synch with the motifs of the rest of your site.

Once you have completed the installation successfully, you will have a working query form like the one shown below (go ahead and test it).

Use the following form to perform a query exclusively on the InterNIC database (which includes the ".com", ".net", and ".org" top level domain names). Not only can you determine whether a domain name you desire is already in use, but you can find contact names, e-mail addresses, postal addresses, and telephone numbers. Simply enter the appropriate identifier (such as a domain name, NIC handle, etc) in the entry field below and select the "Query" button.



The default action (unless directed otherwise by entering a specific domain name or NIC handle), is to do a very broad search, looking for matches in all types of records and most fields (name, nickname, hostname, net address, etc) in the database. For more information, enter "help" in the entry field above and select the "Query" button or check out the Whois help page maintained by InterNIC.

top


bd