OpenSSL 1.1.1 php enabled for apache
all sites give me "1970-01-01" as an expiry date
<?php
$websites = $_POST['websites'];
$websites = explode(',', $websites);
foreach ($websites as $website) :
$website = trim($website);
$cert = openssl_x509_parse(file_get_contents("https://{$website}"));
$expiration = date('Y-m-d', $cert['validTo_time_t']);
echo "{$website}: {$expiration}<br>";
endforeach;
?>
any site gives the same date