Repository navigation
Expand file tree
/
Copy pathconfig.sample.php
More file actions
85 lines (66 loc) · 1.85 KB
/
Copy pathconfig.sample.php
File metadata and controls
85 lines (66 loc) · 1.85 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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
<?php
/*
TinyMTR Web Monitor
Version 1.5.0
https://picotory.com
config.php
*/
if(!headers_sent()) {
session_start();
}
date_default_timezone_set("Europe/London");
include 'inc/HTTP_R.class.php';
include 'inc/tinymtr.class.php';
include 'Plugins/autoload.php';
$TinyMTR = new TinyMTR();
# Site info
$siteName = 'TinyMTR';
$siteLoc = 'http://yoursite.com/TinyMTR/'; // With final '/'
$externalFile = 'TinyMTR.php'; // View the documentation
$usePrettyURLs = 0; // Do not change ~ Docs coming in v2
# Language
$siteLang = 'en';
# Version
$version = '1.5.0';
# Option to disable the need for a TinyMTR.php file
$reqMtr = false;
# Records
$keepLast = 31; // How many days to keep records for (should normally leave this as-is) put 0 to not remove any
# SQL credentials
define('HOST', 'localhost');
define('DBSE', 'Database_name');
define('USER', 'Database_user');
define('PASS', 'Database_pass');
# Email Sending
$useEmail = 0;
############################
/* No need to edit below! */
############################
# Cron debug
$cDebug = 0;
# Cron interval in minutes ~ THIS IS WHAT YOU HAVE SET IN CRONTAB/CPANEL (should be either "1" or "5" minutes)
$cInterval = 5;
# Using pretty URLs, so no extension
if($usePrettyURLs) {
$x = '';
}else{
$x = '.php';
}
# Find the language file, if not - default to English
if(is_file(__DIR__ . '/inc/' . $siteLang . '.php')) {
include __DIR__ . '/inc/' . $siteLang . '.php';
}else{
include __DIR__ . '/inc/en.php';
}
# Work out how many records to keep
$keepLast = $keepLast * (1440/$cInterval);
# Database connection
$sqlError = 0;
try {
$dbh = new PDO('mysql:host=' . HOST . ';dbname=' . DBSE, USER, PASS);
$dbh->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
} catch(PDOException $e) {
$sqlError = 1;
$errorLogged = $e->getMessage();
}
?>