Last active
January 10, 2017 01:10
-
-
Save TheLastCicada/e54fa8e1c13d5ad5bfdd8a73f07598e6 to your computer and use it in GitHub Desktop.
Print Request HTTP Headers with PHP
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<ul> | |
<?php | |
foreach($_SERVER as $h=>$v) | |
if(ereg('HTTP_(.+)',$h,$hp)) | |
echo "<li>$h = $v</li>\n"; | |
header('Content-type: text/html'); | |
echo "<br> The current directory is: " . getcwd() . "\n"; | |
?> | |
</ul> | |
<!--Original code at https://snippets.aktagon.com/snippets/117-how-to-print-all-http-headers-with-php--> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment