Created
July 4, 2018 15:26
-
-
Save tuck1s/8e67fdf8184bc79f52b3d20354ca6ec8 to your computer and use it in GitHub Desktop.
PHP / Guzzle6 code to check client TLS version
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
require_once 'vendor/autoload.php'; | |
function hows_my_ssl() | |
{ | |
$target = "https://www.howsmyssl.com/a/check"; | |
$client = new \GuzzleHttp\Client(['http_errors' => false]); | |
$res = $client->request("GET", $target); | |
echo $res->getStatusCode() . PHP_EOL; | |
var_dump(json_decode($res->getBody(), false)); | |
} | |
hows_my_ssl(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment