Created
July 28, 2016 09:58
-
-
Save olivierbellone/5fbe074004059c1be5cc81408b72c7b3 to your computer and use it in GitHub Desktop.
Simple TLS version test for PHP, using howsmyssl.com
This file contains hidden or 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 | |
$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
Update to also check the stream wrapper and to show more info: