Thursday, May 14, 2009

ColdFusion - Apache WhoIsClient

I just noticed ColdFusion 8 ships with the Apache (Jakarta) Commons WhoisClient. So if you ever need a WhoIsClient, you might give the built in one a shot.

 
<cfscript>
whois = createObject("java", "org.apache.commons.net.WhoisClient").init();
try {
whois.connect(whois.DEFAULT_HOST);
WriteOutput("<pre>"& whois.query("houseoffusion.com") &"</pre>");
whois.disconnect();
}
catch(IOException e) {
WriteOutput("Error I/O exception: " + e.getMessage());
}
</cfscript>

4 comments:

cfSearching May 15, 2009 at 11:57 AM  

Another fun tool from ColdFusion8\lib\*.jar "grab bag" ;)

jwhite1202 May 15, 2009 at 2:54 PM  

Nice, thanks for the update. I'll have to keep that one in mind.

Unknown May 15, 2009 at 3:23 PM  

This is really cool. Thanks for sharing the discovery :)!

  © Blogger templates The Professional Template by Ourblogtemplates.com 2008

Header image adapted from atomicjeep