PHP log request

18.Aug.2010

Did you ever had a need for logging all parameters sent to your script? If your answer is yes – this is how you can do it in only one line.

PHP log REQUEST:

error_log( print_r($_REQUEST, true), 3, $_SERVER['DOCUMENT_ROOT'] . '/info_index_log.txt');

This script will grab all data sent to your script (POST or GET) and save it in a .txt file.