$_SERVER — this is for obtaining server and execution environment information.
It is an array containing information such as headers, paths, and script locations.
The entries in this array are created by the web server.
<?php echo $_SERVER['SERVER_NAME']; echo "\n"; echo $_SERVER['PHP_SELF']; ?>
You can try the script here.
It will output something like this:www.codecrawl.com /code/g_server.php