-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathcli.php
More file actions
20 lines (20 loc) · 697 Bytes
/
cli.php
File metadata and controls
20 lines (20 loc) · 697 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
<?php
//suppress notices because they annoy me
error_reporting(E_ALL & ~E_NOTICE);
require_once(__DIR__.'/checks.php');
require_once(__DIR__.'/sslLabsApi.php');
define("UNDETECTED","Undetected");
if (php_sapi_name() != 'cli') {
throw new Exception('This application must be run on the command line.');
}
//first argument, a URL
$site= $argv[1];
$date = gmdate('Y-m-d H:i:s');
$api = new sslLabsApi();
$prime_ssl_check = json_decode($api->fetchHostInformation($host,false,false,false,null,'done',false),true);
$site_info = check_site($site);
$site_info['date'] = $date;
$perf = check_browsertime($site);
$ssl = check_ssl($site);
gsheet_append($site_info,$perf,$ssl);
echo "\nTests Complete\n";