Copy RequestLogger.php to the entry directory of your web server. Log the request with these two lines.
<?php
require_once(__DIR__ . "/RequestLogger.php");
RequestLogger\logRequest();
composer require jasekiw/php-request-logger
Write the current request to request_log.log
where
the RequestLogger.php file is located.
<?php
RequestLogger\logRequest();
If you want to write it elsewhere just pass the file path to the function.
<?php
RequestLogger\logRequest(__DIR__ . "/request_log.php");