-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconfig.php
More file actions
51 lines (42 loc) · 1.4 KB
/
config.php
File metadata and controls
51 lines (42 loc) · 1.4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
<?php
/*
--------------------------------------------------------
ChiliStats(Revived) is based on the original code from Adam Pawlita (https://pawlita.de)
Currently maintained by KuJoe (https://github.com/KuJoe/ChiliStats/)
--------------------------------------------------------
Original Copyright Notice:
The script is protected by copyright law. All rights and
copyrights are held by the author: Adam Pawlita
This script may be freely used and redistributed so long
the stated copyright notices in all parts of the script before-
hands remain. For correct operation, or damage caused by
the operation of this script is made only if the author has no
Warranty. Commissioning is carried out in each case
at their own risk of the operator.
-------------------------------------------------------
*/
//
// !! Important settings
//
// Database Connection
$db_file_path = "stats.db";
//
// Optional settings
//
$reload=3*60*60; // Reload lock in seconds (3 * 60 * 60 => 3 hours)
$online=3*60; // online time in seconds (3 * 60 => 3 minutes)
$oldentries=7; // delete Visitor infos after x days (7 => 7 days)
//
// End of settings
//
try {
$conn = new PDO("sqlite:$db_file_path");
$conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
} catch(PDOException $e) {
die("Connection failed: " . $e->getMessage());
}
// Check if database selection was successful
if (!$conn) {
exit;
}
?>