From 298d5044c7693f7e2fb98991c0ec4c3c62613a47 Mon Sep 17 00:00:00 2001 From: Reinhold Kainhofer <reinhold@kainhofer.com> Date: Fri, 1 Jan 2016 23:25:53 +0100 Subject: [PATCH] Log all queries --- index.php | 7 +++++++ logs/index.html | 0 2 files changed, 7 insertions(+) create mode 100644 logs/index.html diff --git a/index.php b/index.php index 1e0f9af..ddeba27 100755 --- a/index.php +++ b/index.php @@ -21,6 +21,13 @@ $extension = get_query_arg('extension'); $order_number = get_query_arg('order_number'); $order_pass = get_query_arg('order_pass'); +// Log all update queries +file_put_contents( + __DIR__.'/logs/access_'.date("Y-m-d").'.log', + date("c") . ", " . $_SERVER['REMOTE_ADDR'] . ", $package/$extension, $order_number, $order_pass\n", + FILE_APPEND +); + $tmplfile = __DIR__ . '/' . $package . '/' . $extension . '.tmpl'; if (file_exists($tmplfile)) { $updatefile = file_get_contents($tmplfile); diff --git a/logs/index.html b/logs/index.html new file mode 100644 index 0000000..e69de29 -- GitLab