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:

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

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

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

    ReplyDelete