andyftw/ssslabs-php

SSL Labs API PHP-端口

v1.2 2016-05-24 23:25 UTC

This package is not auto-updated.

Last update: 2024-09-26 00:44:50 UTC


README

这个PHP库提供了对SSL Labs API的基本访问。它基于官方的 API文档

Build Status Latest Stable Version License

<?php

require_once 'vendor/autoload.php';

$api = new \Andyftw\SSLLabs\Api();

try {
  $info = $api->info();
  echo $info->getStatus();
} catch (\Andyftw\SSLLabs\Exception\ApiException $e) {
  echo $e->getMessage() . ' @ ' . $e->getCall();
}

注册注解处理器

添加以下行应该可以解决 问题

require_once 'vendor/autoload.php';
$loader = require_once 'vendor/autoload.php';
AnnotationRegistry::registerLoader(array($loader, "loadClass"));

方法

info()

检查SSL Labs可用性

analyze()

调用评估并检查进度

getEndpointData()

检索详细端点信息

getStatusCodes()

检索已知状态码

getRootCertsRaw()

检索根证书