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/):
<cfscript>
whois = createObject(“java”, “org.apache.commons.net.WhoisClient”);
whois.init();
whois.connect(“192.149.252.43”); // whois.arin.net
WriteOutput(whois.query(“204.212.42.4”)); // your random ip address here
whois.disconnect();
</cfscript>
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).
Excellent tip Aaron … thanks. The ARIN response information shouldn’t be tough to parse. …Scott
So how exactly do you download it and install it? If you are not a java person?
I plan to use this as part of a user tracking session management tool…