PHP code example of misantron / letsencrypt-client

1. Go to this page and download the library: Download misantron/letsencrypt-client 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/ */

    

misantron / letsencrypt-client example snippets


use LetsEncrypt\Client;

$client = new Client($accountKeysPath, $certificatesPath);

use LetsEncrypt\Client;

$client = new Client($accountKeysPath, $certificatesPath, false);

use LetsEncrypt\Client;                       
use LetsEncrypt\Logger\Logger;
use LetsEncrypt\Logger\LogStrategy;

$strategy = LogStrategy::errorsOnly();
// $logger is an instance of PSR-3 logger (\Psr\Log\LoggerInterface)
$clientLogger = new Logger($logger, $strategy);
$client = new Client($accountKeysPath, $certificatesPath, true, $clientLogger);