Created
May 7, 2018 06:05
-
-
Save froemken/b9e96e80159e93eaa054809bd9c8b8e5 to your computer and use it in GitHub Desktop.
A little request logger
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 | |
$fp = fopen('requests.txt', 'a'); | |
$now = new \DateTime('now'); | |
fwrite( | |
$fp, | |
sprintf( | |
'%s %s %s' . CHR(10), | |
$now->format('d.m.Y H:i:s'), | |
$_SERVER['REMOTE_ADDR'], | |
$_SERVER['REQUEST_URI'] | |
) | |
); | |
fclose($fp); | |
require __DIR__ . '/typo3/sysext/frontend/Resources/Private/Php/frontend.php'; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment