Musings of a Manchester Drupal guy

Drupal, Open Source, Analytics, Social Media.

Sunday, October 24, 2004

Obtaining the Servers Windows Name

This is a useful trick to know

inet = CreateObject("java", "");
inet = inet.getLocalHost();
inet = inet.getHostName();

I use it for detecting the environment code is on i.e. the development, staging and live servers.