Created
December 27, 2022 01:23
-
-
Save h4sh5/8fead1ca95fba23261e28d7faad0d14f to your computer and use it in GitHub Desktop.
log request data
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 | |
| // a script that just logs stuff, from something like echo 123 | curl -d@- url | |
| $entityBody = file_get_contents('php://input'); | |
| file_put_contents('just_the_log.txt', "\n---" . $_SERVER["REMOTE_ADDR"] . "|" . $_SERVER["HTTP_X_FORWARDED_FOR"] . "|" . $entityBody, FILE_APPEND | LOCK_EX); | |
| ?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment