ColdFusion Muse

Ask A Muse: Looking Up and IP Address By Host Name

Muse Reader Asks:
I need to resolve an internet address. For example, if I have www.someintenetsite.com, I'd like to be able to return the IP address.

One of the nice things about Coldfusion is the easy access to all that lovely Java stuff under the hood. Check out this network function listed at cflib.org. the basic syntax is:

<cfscript>
    MyIp = getHostAddress(someurl);
</cfscript>
That's it. Good luck and happy coding.

Comments
Ben Forta's Gravatar Darn, I wrote that UDF years ago, forgot all about it! :-)

--- Ben
# Posted By Ben Forta | 2/21/07 3:57 PM



Blog provided and hosted by CF Webtools. Blog Sofware by Ray Camden.