ColdFusion Whois client using Jakarta Commons/Net lib

Doug posted a query on the cfguru list asking how he might retrieve whois information using ColdFusion. I mentioned that there are numerous tags (search on google if you want to see them), but that it’s pretty easy to do within ColdFusion if you drop the Jakarta Commons/Net jar into your ColdFusion lib directory (cfusionmx/wwwroot/WEB-INF/lib/):

  whois = createObject(“java”, “”);
  whois.connect(“”); //
  WriteOutput(whois.query(“”)); // your random ip address here

Note that the whois service works over port 43, so your server must have outbound access to port 43 (if you’re accessing a server outside your own network, performance would presumably be much better if you ran your own whois server internally).

2 thoughts on “ColdFusion Whois client using Jakarta Commons/Net lib”

Leave a Reply

Your email address will not be published. Required fields are marked *