February 19, 2009
Coldfusion: DNS Reverse Lookup
I have no idea why this information was so difficult to find, but I'm posting it here in case I ever need it again. To do a reverse lookup in coldfusion: <cfscript> rawIP = createObject("java", "java.net.InetAddress").getByName('#ipaddress#').getAddress(); hostname = createObject("java", "java.net.InetAddress").getByAddress('#rawIP#').getHostName(); chostname = createObject("java", "java.net.InetAddress").getByAddress('#rawIP#').getCanonicalHostName(); </cfscript> Note — this is slow. If you're doing them in [...]
Filed by JC at February 19th, 2009 under ColdFusion
3 persons have commented this post