You can inspect the contents of any variable in PHP using
print_r. Have a look at the contents of $_SERVER and you might see the values you are interested in:
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.