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 get the expiry date of that file using PHP.
相关问题
- Views base64 encoded blob in HTML with PHP
- Laravel Option Select - Default Issue
- PHP Recursively File Folder Scan Sorted by Modific
- Can php detect if javascript is on or not?
- Using similar_text and strpos together
The code below should help:
The expiry date should be under $certinfo['validTo'] field.
This worked for me:
fine ssl expire time in this fild
Convert Date & Time
Result:
Valid From: Mon, 09 Oct 2017 07:00:00 +0700 Valid To: Wed, 10 Oct 2018 06:59:59 +0700