Skip to content

Instantly share code, notes, and snippets.

@tuck1s
Created July 4, 2018 15:26
Show Gist options
  • Save tuck1s/8e67fdf8184bc79f52b3d20354ca6ec8 to your computer and use it in GitHub Desktop.
Save tuck1s/8e67fdf8184bc79f52b3d20354ca6ec8 to your computer and use it in GitHub Desktop.
PHP / Guzzle6 code to check client TLS version
<?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