aboutsummaryrefslogtreecommitdiffhomepage
path: root/application/Utils.php
diff options
context:
space:
mode:
Diffstat (limited to 'application/Utils.php')
-rw-r--r--application/Utils.php13
1 files changed, 13 insertions, 0 deletions
diff --git a/application/Utils.php b/application/Utils.php
index aeaef9ff..a9a10ece 100644
--- a/application/Utils.php
+++ b/application/Utils.php
@@ -4,6 +4,19 @@
4 */ 4 */
5 5
6/** 6/**
7 * Logs a message to a text file
8 *
9 * @param string $logFile where to write the logs
10 * @param string $clientIp the client's remote IPv4/IPv6 address
11 * @param string $message the message to log
12 */
13function logm($logFile, $clientIp, $message)
14{
15 $line = strval(date('Y/m/d_H:i:s')).' - '.$clientIp.' - '.strval($message).'\n';
16 file_put_contents($logFile, $line, FILE_APPEND);
17}
18
19/**
7 * Returns the small hash of a string, using RFC 4648 base64url format 20 * Returns the small hash of a string, using RFC 4648 base64url format
8 * 21 *
9 * Small hashes: 22 * Small hashes: