Here is a tutorial I wrote about creating a custom security log using PHP. It includes definitions for all the terms, $_SERVER, REMOTE_ADDR, REQUEST_METHOD, PHP_SELF, QUERY_STRING,REQUEST_TIME fopen, fclose, fwrite, etc., an explanation for the function/script and the complete finished code with instructions on how to use it.

Create Your Own Security Logs