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:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
<?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


0 Comments

Leave a Reply

Avatar placeholder

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