PHP code example of chrisullyott / php-ssl-monitor

1. Go to this page and download the library: Download chrisullyott/php-ssl-monitor 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/ */

    

chrisullyott / php-ssl-monitor example snippets




$domains = [
    'www.domainone.com',
    'www.domaintwo.com',
    'www.domainthree.com'
];

$monitor = new SslMonitor($domains);

// The maximum number of days before expiration in order to be notified.
$monitor->setBeforeDays(30);

// Must expire within this many days in order to be notified on weekends.
$monitor->setCriticalDays(7);

// The maximum number of days after expiration in order to still be notified.
$monitor->setAfterDays(7);

echo $monitor->buildMessage() . "\n";

composer