|
|
Server Time: Sunday May 11 2008 08:16 PM |
|
Your Time: |
 |
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.
<center>
<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"
method="GET"
resolveurl="yes"
throwonerror="yes">
</cfhttp>
<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)>
<cfoutput>
<!--- This will determine if the domain is registered --->
<cfif registered neq 0>
The domain "#form.domain##form.ext#" is available!
<br>
<cfelse>
The domain "#form.domain##form.ext#" is already registered.
<br>
<br>
<!--- Shows the results --->
#info_on#
</cfif>
<br>
</cfoutput>
<cfelse>
<!--- Form for the search --->
<form method="post"
action="/index.cfm?action=find">
Enter Domain:
<br>
<font size="1">
<b>http://www.</b>
<input type="text"
name="domain">
<select name="ext">
<option>.com</option>
<option>.net</option>
<option>.edu</option>
</select>
<input type="submit"
value="Search">
</form>
</cfif>
</center>
Well, there you go. Easy, little code for a simple WHOIS search.
Questions, comments, or anything else, please contact Drew Tempelmeyer
Date added: Sun. April 27, 2003
Posted by: Drew Tempelmeyer | Views: 9104 | Tested Platforms: CF5 | Difficulty: Intermediate
Working w/Data
Creating Static HTML Pages from Dynamic Pages
Static HTML can help reduce the load on the server. This helps resources be used for other things that you may possibly need. Creating static HTML in ColdFusion is a simple task and can simply be done by following this tutorial. - Date added: Thu. March 31, 2005
Parsing XML With ColdFusion MX
Want to know how to parse XML with ColdFusion with ease and very basic concepts? Then this is the tutorial for you. - Date added: Sun. November 9, 2003
9 Day Weather Forecast
This will retrieve the 9 day weather forecast for the specified ZIP code. - Date added: Fri. May 16, 2003
Shout Box [LIVE]!
Ever want a place where people can chat or post their opinions? Ever heard of a shout box? This tutorial will give you an easy example of having a shout box on your site. - Date added: Sat. February 22, 2003
|
Can this search be improvised further
Thanks for this easy yet accomplishing tutorial.
Posted by: Amimul Ehsan Sadie
Posted on: 03/21/2005 04:04 AM
|
Find Expiration Date
Is there any way for the code to pull out just the expiration date, and output that?
Posted by: JR
Posted on: 05/06/2005 01:00 AM
|
well nice tutorial
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
Posted by: Jaspal Mehta
Posted on: 11/09/2005 07:37 AM
|
Works great, except for odd extensions (.co.uk, etc)
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!
Posted by: Derek
Posted on: 08/26/2006 04:20 PM
|
New internic.net Report URL
Hi everyone!
internic.net has changed their report URL. So, use
<cfhttp url="http://reports.internic.net/cgi/whois?whois_nic=#form.domain##form.ext#&type=domain" method="GET" resolveurl="yes" throwonerror="yes">
and it should work fine!
Thanks! Overall, this tutorial is great!
Posted by: Neyadhish Chakma
Posted on: 04/05/2008 06:54 PM
|
|
|
|
|
|
|
|