House of Fusion
Search over 2,500 ColdFusion resources here
  
Home of the ColdFusion Community

Mailing Lists
Home /  Groups /  ColdFusion Talk (CF-Talk)

getting server name

  << Previous Post |  RSS |  Sort Oldest First |  Sort Latest First |  Subscribe to this Group Next >> 
i think this is available in the CGI scope.
Michael Grant
09/02/10 01:48 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
Top  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Eric Roberts
09/02/2010 01:44 PM

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

Top  |   Parent  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Michael Grant
09/02/2010 01:48 PM

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 -----

Top  |   Parent  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Andy Matthews
09/02/2010 01:56 PM

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

Top  |   Parent  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Eric Roberts
09/03/2010 07:19 AM

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

Top  |   Parent  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Peter Amiri
09/02/2010 01:56 PM

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 -----

Top  |   Parent  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group

<< Previous Thread Today's Threads Next Thread >>

Search cf-talk

February 08, 2012

<<   <   Today   >   >>
Su Mo Tu We Th Fr Sa
       1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29