|
Mailing Lists
|
Home /
Groups /
ColdFusion Talk (CF-Talk)
getting server name
Does anyone know if CF,r via a .NET object even, I can get the server nameEric Roberts 09/02/10 01:44 P i think this is available in the CGI scope.Michael Grant 09/02/10 01:48 P Hah! I just implemented this same thing in our system the other day.Andy Matthews 09/02/10 01:56 P Thanks!!! That did it!!Eric Roberts 09/03/10 07:19 A Eric,Peter Amiri 09/02/10 01:56 P Nice one! 8^)Carl Von Stetten 09/02/10 02:02 P Does anyone know if CF,r via a .NET object even, I can get the server name (not the domain or IP) to use to differentiate servers in the application.cfm? The server name is the one thing that won't change if the server get changed. Thanks! Eric i think this is available in the CGI scope. Do this: <cfdump var="#cgi#"/> On Thu, Sep 2, 2010 at 1:43 PM, Eric Roberts < owner@threeravensconsulting.com> wrote: ----- Excess quoted text cut - see Original Post for more ----- Hah! I just implemented this same thing in our system the other day. This code snippet will return the computer's "name": CreateObject("java", "java.net.InetAddress").getLocalHost().getHostName() andy Does anyone know if CF,r via a .NET object even, I can get the server name (not the domain or IP) to use to differentiate servers in the application.cfm? The server name is the one thing that won't change if the server get changed. Thanks! Eric Thanks!!! That did it!! Eric Hah! I just implemented this same thing in our system the other day. This code snippet will return the computer's "name": CreateObject("java", "java.net.InetAddress").getLocalHost().getHostName() andy Does anyone know if CF,r via a .NET object even, I can get the server name (not the domain or IP) to use to differentiate servers in the application.cfm? The server name is the one thing that won't change if the server get changed. Thanks! Eric Eric, You can do this via a java object. Try this code to get the local server host name: <cfset inet = CreateObject("java", "java.net.InetAddress")> <cfset inet = inet.getLocalHost()> -- Peter Amiri Founder | Alurium Hosting 949-338-3862 | peter@alurium.com | http://www.alurium.com LinkedIn: http://www.linkedin.com/in/peteramiri | IM bpamiri (AIM/MSN/Y!/GTLK/SKYPE) On Sep 2, 2010, at 10:43 AM, Eric Roberts wrote: ----- Excess quoted text cut - see Original Post for more -----
|
February 08, 2012
|
Latest Fusion Authority Articles
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||