I want to get the expiry date from the SSL Certificate file. There is a web page in PHP that I\'ve created, in which user can upload his SSL Certificate file and I will have to
$certpath = "your_certificate.cer"; $certinfo = openssl_x509_parse(file_get_contents($certpath)); if( $certinfo['validFrom_time_t'] > time() || $certinfo['validTo_time_t'] < time() ) print "Certificate is expired.";