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”, “org.apache.commons.net.WhoisClient”);
whois.connect(“22.214.171.124”); // whois.arin.net
WriteOutput(whois.query(“126.96.36.199”)); // 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).