PHP code example of victord11 / ssl-certification-health-check
1. Go to this page and download the library: Download victord11/ssl-certification-health-check 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/ */
victord11 / ssl-certification-health-check example snippets
// typically, in a service provider
use Spatie\Health\Facades\Health;
use VictoRD11\SslCertificationHealthCheck\SslCertificationExpiredCheck;
use VictoRD11\SslCertificationHealthCheck\SslCertificationValidCheck;
Health::checks([
SslCertificationExpiredCheck::new()->url('google.com')->warnWhenSslCertificationExpiringDay(15)->failWhenSslCertificationExpiringDay(10),
SslCertificationValidCheck::new()->url('google.com'),
]);