On Dec 3, 2003, at 10:04 PM, Elliot Russo wrote:
Any easy way to get the ip of the server hosting the page and used for the request, why couldn't it be cgi.server_ip :)

This should work:


<cfset inet=createObject('java', 'java.net.InetAddress')>
<cfset inet=inet.getLocalHost()>
<cfoutput>#inet.getHostAddress()#</cfoutput>

(credit goes to someone else who recently posted similar code for the server hostname - call getHostName() instead of getHostAddress() for that - sorry I can't remember who at the moment).

Sean A Corfield -- http://www.corfield.org/blog/

"If you're not annoying somebody, you're not really alive."
-- Margaret Atwood


--- You are currently subscribed to cfaussie as: [EMAIL PROTECTED] To unsubscribe send a blank email to [EMAIL PROTECTED]

MXDU2004 + Macromedia DevCon AsiaPac + Sydney, Australia
http://www.mxdu.com/ + 24-25 February, 2004

Reply via email to