-
Notifications
You must be signed in to change notification settings - Fork 10
/
licence_check.php
37 lines (31 loc) · 1000 Bytes
/
licence_check.php
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
<?php
/**
* DVLA Licence Status Check
*
* @category File
* @package DVSATestCheck
* @author Craig Watson <[email protected]>
* @license https://www.apache.org/licenses/LICENSE-2.0 Apache License, Version 2.0
* @link https://github.com/craigwatson/dvsa-test-check
*/
// Script set-up
date_default_timezone_set('Europe/London');
$include_dir = dirname(__FILE__);
// Include DOM parser + script functions
require_once "$include_dir/inc/simple_html_dom.php";
require_once "$include_dir/inc/functions.php";
// Error if secrets file not found
if (!is_file("$include_dir/secrets.php")) {
die(logger("Secrets file not found at $include_dir/secrets.php", "ERROR"));
} else {
include_once "$include_dir/secrets.php";
}
// System Variables
$email_subject = "Driving Licence Status Check";
$user_agent = 'Mozilla/5.0';
// Loop through checks to make
foreach ($licence_data as $name => $data) {
logger("========= Running Check for: $name");
runLicenceCheck($data);
}
?>