Created
August 17, 2022 13:46
-
-
Save CezaryDanielNowak/93f044db14aa6ea352fecd0ff9a9e00f 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 | |
/* | |
Place this file in writable directory. Each incoming request will be saved as a file. | |
Sample file name: | |
callback_POST_08-17-2022 13.42.05.780400.txt | |
*/ | |
$now = DateTime::createFromFormat('U.u', microtime(true)); | |
$file_name = 'callback_' . $_SERVER['REQUEST_METHOD'] . '_' . $now->format("m-d-Y H.i.s.u").'.txt'; | |
$myfile = fopen($file_name, "w") or die("Unable to open file!"); | |
fwrite($myfile, "GET:" . json_encode($_GET)); | |
fwrite($myfile, "\nPOST:" . file_get_contents('php://input')); | |
fclose($myfile); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment