takuya/php-cert-checker

get certificate information

1.0 2022-08-16 06:10 UTC

This package is auto-updated.

Last update: 2024-12-18 11:18:32 UTC


README

Check cert is Expired or not.

<?php
use Takuya\PhpCertChecker\CertificateChecker;
//
$checker = new CertificateChecker("twitter.com");
if ($checker->isCertExpired()){
  echo "The Cert is Expired at ". $checker->getExpiredAt();
}

Installing

from github

composer config repositories.'php-cert-checker' \
         vcs https://github.com/takuya/php-cert-checker  
composer require takuya/php-cert-checker:master
composer install 

from packagist

composer require takuya/php-cert-checker

Testing

git clone https://github.com/takuya/php-cert-checker
cd php-cert-checker
composer install 
vendor/bin/phpunit