Re: Access CLIENTNAME

From: Date: Mon, 09 Aug 2004 17:02:16 +0000
Subject: Re: Access CLIENTNAME
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-193213@lists.php.net to get a copy of this message
On Mon, 2004-08-09 at 03:16, Lester Caine wrote: > At the risk of getting my head bitten off I ask this again, as I am not > getting any help anywhere. > > I'm running a PHP system that relies on knowing the location of the > terminal to handle a lot of '911' (999) type things. I know that > REMOTE_ADDR can not be relied on, but with fixed IP addresses on a local > network it works fine. However I now have a customer who has a Terminal > Server thin client network, and REMOTE_ADDR only reports the server > address. In order to restore the facilities I need to gain access to the > CLIENTNAME environmental variable from the browser and return it to PHP. > > I've already got the simple bodge - they type it on on login - which is > simply a joke when coming to use the system. I have a TS logon batch > file which copies the CLIENTNAME variable to a file from which it could > be accessed. BUT I have yet to find any way to pass the information. > > Can anybody kick me in the right direction, or do I have to stick with a > drop down list in the logon box and expect everybody to know where they > are? > > Surely VOIP is going to run into this problem soon isn't it? (Not that I > can see how TS can actually handle the microphone and camera anyway ;) ) > > -- > Lester Caine > ----------------------------- > L.S.Caine Electronic Services This won't work? function get_ip() { if (isSet($_SERVER)) { if (isSet($_SERVER["HTTP_X_FORWARDED_FOR"])) { $realip = $_SERVER["HTTP_X_FORWARDED_FOR"]; } elseif (isSet($_SERVER["HTTP_CLIENT_IP"])) { $realip = $_SERVER["HTTP_CLIENT_IP"]; } else { $realip = $_SERVER["REMOTE_ADDR"]; } } else { if ( getenv( 'HTTP_X_FORWARDED_FOR' ) ) { $realip = getenv( 'HTTP_X_FORWARDED_FOR' ); } elseif ( getenv( 'HTTP_CLIENT_IP' ) ) { $realip = getenv( 'HTTP_CLIENT_IP' ); } else { $realip = getenv( 'REMOTE_ADDR' ); } } return $realip; } -- Scot L. Harris <webid@cfl.rr.com>

« previous php.general (#193213) next »