Skip to content

Commit

Permalink
Add and display version, closes #109
Browse files Browse the repository at this point in the history
  • Loading branch information
RetGal committed Feb 29, 2024
1 parent 3f243ce commit 76652b1
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions ext/index.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php
define('VERSION', "v.1.2");
// name of the database file (may also be a path)
define('DB_NAME', "dayon.db");
// minimal length of the tokens to be generated (33^N-1 variants)
Expand All @@ -24,6 +25,8 @@
$pdo = new PDO('sqlite:'.DB_NAME);
echo readToken($token, $pdo),"\n";
updateToken($token, $_SERVER['REMOTE_ADDR'], $pdo);
} else {
echo VERSION,"\n";
}

function clean($val, $maxLen = "") {
Expand Down

0 comments on commit 76652b1

Please sign in to comment.