Source: https://stackoverflow.com/questions/6863948/how-to-get-expiry-date-from-the-ssl-certificate-file-in-php
Array ( [name] => /CN=lunawebs.com [subject] => Array ( [CN] => lunawebs.com ) [hash] => 105ebe35 [issuer] => Array ( [C] => US [O] => Let's Encrypt [CN] => R10 ) [version] => 2 [serialNumber] => 540991048428075146544168625012238276379962 [serialNumberHex] => 0635D46DFB36F83356BCD9FA2381725C453A [validFrom] => 250801051054Z [validTo] => 251030051053Z [validFrom_time_t] => 1754025054 [validTo_time_t] => 1761801053 [signatureTypeSN] => RSA-SHA256 [signatureTypeLN] => sha256WithRSAEncryption [signatureTypeNID] => 668 [purposes] => Array ( [1] => Array ( [0] => 1 [1] => [2] => sslclient ) [2] => Array ( [0] => 1 [1] => [2] => sslserver ) [3] => Array ( [0] => 1 [1] => [2] => nssslserver ) [4] => Array ( [0] => [1] => [2] => smimesign ) [5] => Array ( [0] => [1] => [2] => smimeencrypt ) [6] => Array ( [0] => [1] => [2] => crlsign ) [7] => Array ( [0] => 1 [1] => 1 [2] => any ) [8] => Array ( [0] => 1 [1] => [2] => ocsphelper ) [9] => Array ( [0] => [1] => [2] => timestampsign ) ) [extensions] => Array ( [keyUsage] => Digital Signature, Key Encipherment [extendedKeyUsage] => TLS Web Server Authentication, TLS Web Client Authentication [basicConstraints] => CA:FALSE [subjectKeyIdentifier] => 7F:91:A6:98:0F:23:50:50:3F:D6:09:28:CB:00:D6:BA:47:09:5F:5B [authorityKeyIdentifier] => keyid:BB:BC:C3:47:A5:E4:BC:A9:C6:C3:A4:72:0C:10:8D:A2:35:E1:C8:E8 [authorityInfoAccess] => CA Issuers - URI:http://r10.i.lencr.org/ [subjectAltName] => DNS:lunawebs.com, DNS:lunawebs.lunasoft.com, DNS:www.lunawebs.com [certificatePolicies] => Policy: 2.23.140.1.2.1 [crlDistributionPoints] => Full Name: URI:http://r10.c.lencr.org/59.crl [ct_precert_scts] => Signed Certificate Timestamp: Version : v1(0) Log ID : 0D:E1:F2:30:2B:D3:0D:C1:40:62:12:09:EA:55:2E:FC: 47:74:7C:B1:D7:E9:30:EF:0E:42:1E:B4:7E:4E:AA:34 Timestamp : Aug 1 06:09:24.587 2025 GMT Extensions: none Signature : ecdsa-with-SHA256 30:46:02:21:00:87:D9:EF:00:49:E9:40:CE:48:A6:70: FC:D7:E2:C1:4A:64:23:00:80:0C:B5:ED:4B:A3:D5:5F: CF:D5:C7:80:50:02:21:00:8A:F2:F1:FC:E3:94:CB:54: 9D:E9:D0:42:3E:E7:24:64:25:0A:76:5C:69:31:8A:9F: CF:F0:2D:27:36:CD:6A:F6 Signed Certificate Timestamp: Version : v1(0) Log ID : A4:42:C5:06:49:60:61:54:8F:0F:D4:EA:9C:FB:7A:2D: 26:45:4D:87:A9:7F:2F:DF:45:59:F6:27:4F:3A:84:54 Timestamp : Aug 1 06:09:26.587 2025 GMT Extensions: none Signature : ecdsa-with-SHA256 30:45:02:20:52:48:5A:F6:75:F4:3C:5E:05:45:E5:9B: 57:C9:73:38:33:08:EB:80:9A:D6:10:B3:43:35:E8:1F: 5E:8F:27:D6:02:21:00:EB:73:29:B3:EE:93:33:60:F2: 9D:4B:CC:DE:A0:8A:88:17:B1:D1:43:2E:56:08:86:77: A0:49:06:2C:83:55:3E ) )Valid From: Thu, 31 Jul 2025 23:10:54 -0600