PHP code example of joelwmale / php-ssl-certificate
1. Go to this page and download the library: Download joelwmale/php-ssl-certificate library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
joelwmale / php-ssl-certificate example snippets
use Joelwmale\SslCertificate\Certificate;
$certificate = Certificate::forHost('joelmale.com');
$certificate->issuer; // string - the issuer of the certificate
$certificate->domain; // string - the primary domain on the certificate
$certificate->additionalDomains; // array - all the additional/alt domains on the certificate
$certificate->valid; // bool - true if valid, false if not
$certificate->issued; // Carbon - when the certificate was issued
$certificate->expires; // Carbon - when the certificate expires
$certificate->expiresIn; // int - days until the certificate expires
$certificate->expired; // bool - true if the certificate is expired
$certificate->signatureAlgorithm; // string - the signature algorithm used to sign the certificate
$certificate->isSelfSigned; // bool - true if the certificate was self signed