Easily retrieve the ssl certificate for any host
joelwmale/php-ssl-certificate is a Laravel package for easily retrieve the ssl certificate for any host.
It currently has 6 GitHub stars and 3.477 downloads on Packagist (latest version 4.0.0).
Install it with composer require joelwmale/php-ssl-certificate.
Discover more Laravel packages by joelwmale
or browse all Laravel packages to compare alternatives.
Last updated
This package makes it easy to download a certificate for a host.
| PHP Version | Package Version | |-------------|-----------------| | 8.3+ | 4.x | | 8.0 - 8.2 | 3.x |
use Joelwmale\SslCertificate\Certificate;
$certificate = Certificate::forHost('joelmale.com');
You can install the package via composer:
composer require joelwmale/php-ssl-certificate
All properties are readonly.
$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
$certificate->getRawCertificateFieldsAsJson();
Returns true if the certificate will still be valid. Takes a Carbon instance as the first parameter.
$certificate->isValidAt(Carbon::today()->addMonth(1));
Returns true if the certificate contains the domain
$certificate->containsDomain('joelmale.dev');
$ composer test
Please see CHANGELOG for a list of recent changes.