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("" . $out . "
");
} else if (isset($_GET["debug"])) {
print($out . "
");
};
};