Apache is installed. I've replaced this line: $get_headers = apache_request_headers();
with:
$get_headers = ($_SERVER['HTTP_HOST']);
The full code is now:
Code:
<?php
$get_headers = ($_SERVER['HTTP_HOST']);
echo $_SERVER['REQUEST_METHOD'] . " " . $_SERVER['REQUEST_URI'] . " " . $_SERVER['SERVER_PROTOCOL'] . "<br/>";
foreach ($get_headers as $header => $value) {
echo "$header: $value <br/>\n";
}
echo "<br/><br/>Your IP address is: " . $_SERVER['REMOTE_ADDR'];
?>
This seems to get me a little further.
Warning: Invalid argument supplied for foreach() in /var/sites/w/willwatts.co.uk/public_html/header_check.php on line 7