Created
January 17, 2018 19:00
-
-
Save rekby/28f99321a8194bad1671ace9c5749734 to your computer and use it in GitHub Desktop.
php log requests
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
<?php | |
if ($_SERVER['REQUEST_METHOD'] === 'POST') { | |
$REKBY_DUMP_ARR = array(); | |
$REKBY_DUMP_ARR['URI'] = $_SERVER['REQUEST_URI']; | |
$REKBY_DUMP_ARR['REQUEST'] = $_REQUEST; | |
$REKBY_DUMP_ARR['GET'] = $_GET; | |
$REKBY_DUMP_ARR['POST'] = $_POST; | |
$REKBY_DUMP_ARR['COOKIE'] = $_COOKIE; | |
$REKBY_DUMP_ARR['REMOTE_ADDR'] = $_SERVER['REMOTE_ADDR']; | |
file_put_contents("../php-log/".date('Y-m-d--H-i-s--').rand(100000,999999), print_r($REKBY_DUMP_ARR, true)); | |
unset($REKBY_DUMP_ARR); | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment