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
Server Variables
Moderator: General Moderators
Code: Select all
echo $_SERVERї"SERVER_ADDR"];
echo php_version();