Reverse IP Address Lookup with ColdFusion + Java

Reverse IP Address Lookup with ColdFusion + Java

I needed to do a reverse lookup on some IP addresses in a database today. I found that you can do this pretty easily with java, and just as easily with ColdFusion. Here it is:

<cfset inet_address = CreateObject(“java”, “java.net.InetAddress”)>

<cfset host_name = inet_address.getByName(“66.249.66.99″).getHostName()>

<cfoutput>#host_name#</cfoutput>

In java this would simply be:

System.out.println( java.net.InetAddress.getByName(“66.249.66.99″).getHostName() );

 

via Reverse IP Address Lookup with ColdFusion + Java.

Hinterlasse eine Antwort

Deine E-Mail-Adresse wird nicht veröffentlicht. Erforderliche Felder sind markiert *

Du kannst folgende HTML-Tags benutzen: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>