Re: [PHP] Remote computer name?
On Friday 21 November 2003 03:33, John Nichel wrote: > Right...it doesn't return the machine name for any of my client machines > (didn't expect it too on the DHCP boxes, but thought it might on the two > static boxes). For the two static machines, it returns the Charter > (cable connection) and BellSouth (DSL connection) names, not my actual > machine name...gateway (returns cable-68-114-97-96.sli.la.charter.com) > for the Charter connection and web01 (returns > adsl-068-209-144-233.sip.msy.bellsouth.net) for the BellSouth. By "remote computer name" I was assuming the OP meant the DNS name. -- Jason Wong -> Gremlins Associates -> www.gremlins.biz Open Source Software Systems Integrators * Web Design & Hosting * Internet & Intranet Applications Development * -- Search the list archives before you post http://marc.theaimsgroup.com/?l=php-general -- /* There are more old drunkards than old doctors. */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Remote computer name?
Jason Wong wrote: > 3) you can always use gethostbyaddr($_SERVER['REMOTE_ADDR']) whenever it is > needed. But do note that $_SERVER['REMOTE_ADDR'] is not a wholly reliable > indicator of who your client is. Right...it doesn't return the machine name for any of my client machines (didn't expect it too on the DHCP boxes, but thought it might on the two static boxes). For the two static machines, it returns the Charter (cable connection) and BellSouth (DSL connection) names, not my actual machine name...gateway (returns cable-68-114-97-96.sli.la.charter.com) for the Charter connection and web01 (returns adsl-068-209-144-233.sip.msy.bellsouth.net) for the BellSouth. -- By-Tor.com It's all about the Rush http://www.by-tor.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Remote computer name?
On Friday 21 November 2003 02:59, Jason Gerfen wrote: > So in that case there isn't a $_SERVER function to gather the remote > computer name? 1) print_r($_SERVER) to see what is available 2) it may be available if you have set your webserver to do DNS lookups. But because it is expensive (ie takes quite a while to do in comparison to simply serving the webpage) it is usually disabled 3) you can always use gethostbyaddr($_SERVER['REMOTE_ADDR']) whenever it is needed. But do note that $_SERVER['REMOTE_ADDR'] is not a wholly reliable indicator of who your client is. -- Jason Wong -> Gremlins Associates -> www.gremlins.biz Open Source Software Systems Integrators * Web Design & Hosting * Internet & Intranet Applications Development * -- Search the list archives before you post http://marc.theaimsgroup.com/?l=php-general -- /* Be valiant, but not too venturous. Let thy attire be comely, but not costly. -- John Lyly */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Remote computer name?
Jason Gerfen wrote: John Nichel wrote: Jas wrote: I am at a loss here but doesn't $_SERVER['HTTP_HOST'] return the remote computer name? [Snippit used] $ipaddy = $_SERVER['REMOTE_ADDR']; $host = $_SERVER['HTTP_HOST']; // as of now it is getting the name of the server (i.e. localhost, 168.2.2.1) jas HTTP_HOST returns the name (or ip) of the machine on which php is running. REMOTE_ADDR will return the ip of the client accessing the document. > So in that case there isn't a $_SERVER function to gather the remote > computer name? > Jas To the best of my knowledge, unless you're running php on a Windoze machine, with domain authenticated Windoze clients, no. -- By-Tor.com It's all about the Rush http://www.by-tor.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Remote computer name?
So in that case there isn't a $_SERVER function to gather the remote computer name? Jas John Nichel wrote: Jas wrote: I am at a loss here but doesn't $_SERVER['HTTP_HOST'] return the remote computer name? [Snippit used] $ipaddy = $_SERVER['REMOTE_ADDR']; $host = $_SERVER['HTTP_HOST']; // as of now it is getting the name of the server (i.e. localhost, 168.2.2.1) jas HTTP_HOST returns the name (or ip) of the machine on which php is running. REMOTE_ADDR will return the ip of the client accessing the document. -- Jason Gerfen Student Computing Group Marriott Library University of Utah (801) 585-9810 [EMAIL PROTECTED] "I'm not a robot like you. I don't like having disks crammed into me... unless they're Oreos, and then only in the mouth." ~Phillip J. Fry -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Remote computer name?
>> [Snippit used] >> $ipaddy = $_SERVER['REMOTE_ADDR']; >> $host = $_SERVER['HTTP_HOST']; // as of now it is getting the name of >> the server (i.e. localhost, 168.2.2.1) >> >> jas > >HTTP_HOST returns the name (or ip) of the machine on which php is >running. REMOTE_ADDR will return the ip of the client accessing the >document. More specifically, HTTP_HOST returns the hostname used in the current request - this may change depending on virtual host settings and relies upon the Host: header in the request. SERVER_NAME returns the name of the machine on which php is running, and (afaik) is /not/ dependent on the virtual host used. The two values are frequently the same. - michal migurski- contact info and pgp key: sf/cahttp://mike.teczno.com/contact.html -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Remote computer name?
Jas wrote: I am at a loss here but doesn't $_SERVER['HTTP_HOST'] return the remote computer name? [Snippit used] $ipaddy = $_SERVER['REMOTE_ADDR']; $host = $_SERVER['HTTP_HOST']; // as of now it is getting the name of the server (i.e. localhost, 168.2.2.1) jas HTTP_HOST returns the name (or ip) of the machine on which php is running. REMOTE_ADDR will return the ip of the client accessing the document. -- By-Tor.com It's all about the Rush http://www.by-tor.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Remote computer name?
I am at a loss here but doesn't $_SERVER['HTTP_HOST'] return the remote computer name? [Snippit used] $ipaddy = $_SERVER['REMOTE_ADDR']; $host = $_SERVER['HTTP_HOST']; // as of now it is getting the name of the server (i.e. localhost, 168.2.2.1) jas -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php