Created
January 18, 2016 09:56
-
-
Save rskuipers/467ead4cf31a15d252fc to your computer and use it in GitHub Desktop.
This file contains hidden or 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
<?php | |
$headers = getallheaders(); | |
$contents = $_SERVER['REQUEST_METHOD'] . ' ' . $_SERVER['REQUEST_URI'] . ' ' . $_SERVER['SERVER_PROTOCOL'] . PHP_EOL; | |
foreach ($headers as $key => $value) { | |
$contents .= $key . ': ' . $value . PHP_EOL; | |
} | |
$contents .= PHP_EOL . file_get_contents('php://input'); | |
file_put_contents(sys_get_temp_dir() . '/request-' . microtime(true) . '.log', $contents); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment