We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 14e59e2 commit 08c0c5dCopy full SHA for 08c0c5d
test/log.php
@@ -19,6 +19,13 @@
19
$type = $_REQUEST['type'];
20
}
21
22
+// Accept different formats of message; for now, that's plain-text and JSON.
23
+$formats = array('text', 'json');
24
+$format = 'text';
25
+if ( !empty($_REQUEST['format']) && in_array($_REQUEST['format'], $formats) ) {
26
+ $format = $_REQUEST['format'];
27
+}
28
+
29
// Initially, assume that this client hasn't logged anything in the last minute.
30
$has_accessed = false;
31
@@ -89,6 +96,7 @@ function($access) {
89
96
'time' => date('Y-m-d H:i:s'),
90
97
'message' => $message,
91
98
'type' => $type,
99
+ 'format' => $format,
92
100
'hash' => sha1("$type:$message")
93
101
);
94
102
0 commit comments