You can inspect the contents of any variable in PHP using var_dump
or print_r
. Have a look at the contents of $_SERVER and you might see the values you are interested in:
var_dump($_SERVER);
If you don't want to show this information in a browser, you can have PHP write it to some temporary file:
file_put_contents('/tmp/file.txt', print_r($_SERVER, true));
And then you can inspect the contents of /tmp/file.txt to see what you get.