I've always had to lookup current status of domain names for clients. Recently I decided why not create my own tools to help with the task.

Live Example http://selflogic.com/domain_tool/

Java documentation. http://docs.oracle.com/javase/7/docs/technotes/guides/jndi/jndi-dns.html#CONF

See the code below.

DNS Function include this with your other UDFs

view plain

1<cffunction name="DNS">
2    <cfargument name="domain" required="Yes">
3    <cfset arguments.domain = Trim(arguments.domain)>
4    <cfset env = CreateObject("java", "java.util.Hashtable")>
5    <cfset env.put("java.naming.factory.initial", "com.sun.jndi.dns.DnsContextFactory")>
6    <cfset env.put("java.naming.provider.url", "dns://8.8.8.8")>
7    <cfset env.put("com.sun.jndi.dns.timeout.initial", "2000")>
8    <cfset env.put("com.sun.jndi.dns.timeout.retries", "3")>
9    <cfset dirContext = CreateObject("java", "javax.naming.directory.InitialDirContext")>
10    <cfset dirContext.init(env)>
11    <cfset type = ArrayNew(1)>
12    <cfset type[1] = "A">
13    <cfset type[2] = "NS">
14    <cfset type[3] = "CNAME">
15    <cfset type[4] = "SOA">
16    <cfset type[5] = "PTR">
17    <cfset type[6] = "MX">
18    <cfset type[7] = "TXT">
19    <cfset type[8] = "HINFO">
20    <cfset type[9] = "AAAA">
21    <cfset type[10] = "NAPTR">
22    <cfset type[11] = "SRV">
23
24    <cftry>
25        <cfset attributes = dirContext.getAttributes(arguments.domain, type)>
26     <cfcatch type="Any">
27         <cfsavecontent variable = "myresult">
28             <cfoutput>#arguments.domain#</cfoutput> has no DNS set up.
29         </cfsavecontent>
30     </cfcatch>
31 </cftry>
32    
33    <cfset atribEnum = attributes.getAll()>
34    <cfsavecontent variable = "myresult">
35        <cfloop condition="#atribEnum.hasMore()#">
36            <cfset attribute = atribEnum.next()>
37            <cfloop index="x" list="#right(attribute,len(attribute)-len(listfirst(attribute,":")))#">
38                <cfoutput>#listfirst(attribute,":")#</cfoutput>:<cfoutput>#listfirst(x,":")#</cfoutput><br>
39            </cfloop>
40        </cfloop>
41    </cfsavecontent>
42    <cfreturn myresult>
43</cffunction>

Calling test code.

view plain

1<cfparam name="url.domain" default="example.com">
2<form method="get">
3    <input name="domain" type="text" value="<cfoutput>#url.domain#</cfoutput>">
4    <button type="submit">Get DNS</button>
5</form>
6<cfoutput>#DNS(url.domain)#</cfoutput>