How to find Server information through PHP||EasyCoding45

 <?php


echo $_SERVER['PHP_SELF'] . "<br>";


echo $_SERVER['SERVER_NAME'] . "<br>";


echo $_SERVER['HTTP_HOST'] . "<br>";


echo $_SERVER['HTTP_USER_AGENT'] . "<br>";


echo $_SERVER['SCRIPT_NAME'] . "<br>";


?>

OutPut :--



Explanation :--

1) It will Display your directory and Program name by using $_SERVER['PHP_SELF'].

2)  Server Name is our Localhost $_SERVER['SERVER_NAME'] .

3) Host is our By default Localhost $_SERVER['HTTP_HOST'].

4) User Agent is Mozilla and Windows10 with 64bit $_SERVER['HTTP_USER_AGENT'].

5) Script Name Returns Directory and File name $_SERVER['SCRIPT_NAME'].


                                        Thank you💛

Comments