Display PHP Server Info | PHP - Hypertext Preprocessor

Standards Based Development

IP address: 176.9.127.69

Host address: tor-1.yui.cat

User agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:41.0) Gecko/20100101 Firefox/41.0

Referrer: http://dev.bowdenweb.com/php/


<? // display PHP + server infos
$ip_address   = $_SERVER['REMOTE_ADDR'];
$host_address = gethostbyaddr($ip_address);
$user_agent   = $_SERVER['HTTP_USER_AGENT'];
$referrer     = $_SERVER['HTTP_REFERER'];

echo "<p><strong>IP address:</strong> " . $ip_address . "</p>" . "\n";
echo "<p><strong>Host address:</strong> " . $host_address . "</p>" . "\n";
echo "<p><strong>User agent:</strong> " . $user_agent . "</p>" . "\n";
echo "<p><strong>Referrer:</strong> ";

if ($referrer == "") {
	echo "[ no referrer ]" . "</p>";
} else {
	echo "$referrer" . "</p>";
} ?>

Display php Server Info