In This Tutorial we are going to learn how we can Write a PHP Program to display all Server information in table format.
Program ::--
<?php
echo "<center><table border=1>";
echo "<tr><th>GateWay Interface</th>";
echo"<td>";
echo $_SERVER['GATEWAY_INTERFACE'];
echo"</td></tr>";
echo "<tr><th>Server Address</th>";
echo"<td>";
echo $_SERVER['SERVER_ADDR'];
echo"</td></tr>";
echo "<tr><th>Server Name</th>";
echo"<td>";
echo $_SERVER['SERVER_NAME'];
echo"</td></tr>";
echo "<tr><th>Server Software</th>";
echo"<td>";
echo $_SERVER['SERVER_SOFTWARE'];
echo"</td></tr>";
echo "<tr><th>Server Protocol</th>";
echo"<td>";
echo $_SERVER['SERVER_PROTOCOL'];
echo"</td></tr>";
echo "<tr><th>Server Host</th>";
echo"<td>";
echo $_SERVER['HTTP_HOST'];
echo"</td></tr>";
echo "<tr><th>Server Referer</th>";
echo"<td>";
echo $_SERVER['HTTP_REFERER'];
echo"</td></tr>";
echo "<tr><th>Server User Agent</th>";
echo"<td>";
echo $_SERVER['HTTP_USER_AGENT'];
echo"</td></tr>";
echo "<tr><th>Server Script Name</th>";
echo"<td>";
echo $_SERVER['SCRIPT_NAME'];
echo"</td></tr>";
?>
Comments
Post a Comment