punkstar / ssl
PHP library for reading and understanding SSL certificates.
Fund package maintenance!
trackssl.com
Installs: 19 080
Dependents: 0
Suggesters: 0
Security: 0
Stars: 17
Watchers: 1
Forks: 5
Open Issues: 1
Requires
- php: ^7.0
- lib-openssl: *
Requires (Dev)
- php-vfs/php-vfs: ^1.3
- phpunit/phpunit: ^5
README
This is a library for easily reading and understanding SSL certificates using PHP.
Installation
composer require punkstar/ssl
Usage
<?php
require_once __DIR__.'/vendor/autoload.php';
use Punkstar\Ssl\Reader;
$reader = new Reader();
$certificate = $reader->readFromUrl("https://github.com");
printf("Name: %s\n", $certificate->certName());
printf("Valid To: %s\n", $certificate->validTo()->format('r'));
printf("Valid From: %s\n", $certificate->validFrom()->format('r'));