Add index.php
This commit is contained in:
commit
7034d43b6e
1 changed files with 18 additions and 0 deletions
18
index.php
Normal file
18
index.php
Normal file
|
@ -0,0 +1,18 @@
|
|||
<?php
|
||||
|
||||
require("settings.php");
|
||||
|
||||
foreach ($sites as $s) {
|
||||
$g = stream_context_create (array("ssl" => array("capture_peer_cert" => true)));
|
||||
$r = stream_socket_client("ssl://" . $s . ":443", $errno, $errstr, 30, STREAM_CLIENT_CONNECT, $g);
|
||||
$p = stream_context_get_params($r);
|
||||
$c = openssl_x509_parse($p["options"]["ssl"]["peer_certificate"]);
|
||||
|
||||
$out = $s . " - " . date("Y-m-d H:i:s",$c["validTo_time_t"]);
|
||||
if ($c["validTo_time_t"] < strtotime("+1 week")) {
|
||||
print("<font color=\"red\"><b>" . $out . "</b></font>");
|
||||
} else {
|
||||
print($out);
|
||||
};
|
||||
print("<br>");
|
||||
};
|
Loading…
Reference in a new issue