PHP Code

How to get complete information about server using PHP code

Hi, In php there is one predefined variable called $_SERVER, with that only we can get the complete information about server. We can get all server information with the below code. And easily access the information for your coding part.

How to get complete information about server using PHP code by Anil Kumar Panigrahi

How to get complete information about server using PHP code by Anil Kumar Panigrahi

Once check the below script:

<?php
echo "<table border = '2' style='color:#ffffff;'>";
$i = 0;
foreach($_SERVER as $key=>$value){
if($i%2 == 0) {
echo "<tr bgcolor='#993300'>";
} else {
echo "<tr bgcolor='#0099FF'>";
}
echo "<td>";
echo $key;
echo "</td>";
echo "<td>";
echo $value;
echo "</td>";
echo "</tr>";
$i++;
}
echo "</table>";
?>
How to get complete information about server using php code

How to get complete information about server using php code

No Comments

    Leave a Reply

    This site uses Akismet to reduce spam. Learn how your comment data is processed.