>> [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/ca http://mike.teczno.com/contact.html -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php