I did not write this script, it's from a book I'm reading. It's meant to display what details are visible to a website from your browser. The code and upload location is below. However, I'm getting an error message when I access the location.
I don't know PHP, although I can understand what's going on in the script. Is this something to do with PHP versions, or am I missing a file somewhere else on my site that is needed?
[NO-PARSE]http://willwatts.co.uk/header_check.php[/NO-PARSE]
Code:
Fatal error: Call to undefined function apache_request_headers() in /var/sites/w/willwatts.co.uk/public_html/header_check.php on line 3
I don't know PHP, although I can understand what's going on in the script. Is this something to do with PHP versions, or am I missing a file somewhere else on my site that is needed?
[NO-PARSE]http://willwatts.co.uk/header_check.php[/NO-PARSE]
Code:
<?php
$get_headers = apache_request_headers();
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'];
?>