I have seen many WHOIS tags that are hard to figure out or couldn't get them to work. I decided to then make my own that is simple to make and to configure.

  <cfparam name = "form.domain" default = "xp-resources">
  <cfparam name =
"form.ext" default = ".com">
  <cfparam name =
"action" default = "none">

  <!--- Determines if the form was submitted --->
  <cfif action is "find">
    <!--- This gets the info --->
    <cfhttp url="http://reports.internic.net/cgi-bin/whois?whois_nic=#form.domain##form.ext#&type=domain"
     <cfset startat = find(
"<pre>", cfhttp.filecontent, 1)>
     <cfset endat = find(
"</pre>", cfhttp.filecontent, startat)>
     <cfset info_length = int(endat - startat)>
     <cfset info_on = mid(cfhttp.filecontent, startat, info_length)>
     <cfset registered = find("No match for domain", info_on, 1)>

        <!--- This will determine if the domain is registered --->
        <cfif registered neq 0>
            The domain "#form.domain##form.ext#" is available! <br>
            The domain "#form.domain##form.ext#" is already registered. <br>
            <!--- Shows the results --->

    <!--- Form for the search --->
    <form method="post" action="#script_name#?action=find">
        Enter Domain: <br>
        <font size="1"> <b>http://www.</b>
        <input type="text" name="domain">
        <select name="ext">
        <input type=
"submit" value="Search">


Well, there you go. Easy, little code for a simple WHOIS search.
Questions, comments, or anything else, please contact Drew Tempelmeyer
About This Tutorial
Author: Drew Tempelmeyer
Skill Level: Intermediate 
Platforms Tested: CF5
Total Views: 129,624
Submission Date: April 27, 2003
Last Update Date: June 05, 2009
All Tutorials By This Autor: 3
Discuss This Tutorial
  • Hi everyone! internic.net has changed their report URL. So, use and it should work fine! Thanks! Overall, this tutorial is great!

  • I was just curious why a search for google.co.uk comes up as available? is this code limited to just .com, .net, and .edu? i modified it to use others but odd ones like the google ones dont seem to bring back the correct values. says google.com.uk is available when it is not. Thanks Derek email@chaoticharmony.net Other than that the code is simple and great!

  • Hi Well i had tried the code but error displayed Connection Failure: Status code unavailable ...I think the problem is due to slow internet connection speed...i will try later on...but want to say Thanks to the author for getting into deeper roots for helping hundreds of like us... Thanks Jaspal Mehta imjmehta@yahoo.com

  • Is there any way for the code to pull out just the expiration date, and output that?

  • Thanks for this easy yet accomplishing tutorial.


Sponsored By...
Mobile App Development (IOS, Android, Cordova, Phonegap, Objective-C, Java) - Austin, Texas Mobile Apps - Touch512, LLC.