Skip to content

Instantly share code, notes, and snippets.

@alexfraundorf-com
Forked from olivierbellone/tls_test.php
Created December 20, 2018 18:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save alexfraundorf-com/bee0b8389807a3494ded8f0889d6ce5d to your computer and use it in GitHub Desktop.
Save alexfraundorf-com/bee0b8389807a3494ded8f0889d6ce5d to your computer and use it in GitHub Desktop.
Simple TLS version test for PHP, using howsmyssl.com
<?php
$ch = curl_init('https://www.howsmyssl.com/a/check');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$data = curl_exec($ch);
curl_close($ch);
$json = json_decode($data);
echo "<pre>TLS version: " . $json->tls_version . "</pre>\n";
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment