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

Anil Kumar Panigrahi

With more than 10 years experience in PHP and Founder of Anil Labs, a blog for PHP and related posts. contributed posts regarding CodeIgniter, CakePHP and Learn PHP online ... Contact : [email protected]

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *

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