Page 1 of 1

Server Variables

Posted: Sun Feb 20, 2005 4:49 pm
by rayner75
Hello i am trying to find out how to display some information on my site.
the information is.

Server Host.
Server IP
Server Protocol
Server Software
User's IP Address
Version of PHP used by the server.

so far i have:

<?php
echo "<strong>Server Host:</strong> ". $_SERVER['HTTP_HOST'] . "<br />";
echo "<strong>Server Protocol</strong> ". $_SERVER['SERVER_PROTOCOL'] . "<br />";
echo "<strong>Server Software</strong> ". $_SERVER['SERVER_SOFTWARE'] . "<br />";
echo "<strong>Users IP Address</strong> ". $_SERVER['REMOTE_ADDR'] . "<br />";
?>

not sure which ones to use for IP addy of the server and Version of PHP
used by the server
Any help would be appreciated
Regards
Andy

Posted: Sun Feb 20, 2005 4:53 pm
by timvw

Code: Select all

echo $_SERVER&#1111;"SERVER_ADDR"];
echo php_version();

Posted: Sun Feb 20, 2005 5:00 pm
by rayner75
cheers :)