Created
May 18, 2017 14:27
-
-
Save imroca/1f53c273da0cd067157d732e9d20f962 to your computer and use it in GitHub Desktop.
Check for TLS 1..2
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 | |
$curl_info = curl_version(); | |
echo "CURL Info\n"; | |
print_r($curl_info); | |
$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 "\n~~~~~~~~~~\n"; | |
print_r($json); | |
echo "\n~~~~~~~~~~\n"; | |
echo "Your TLS version is:" . $json->tls_version; | |
echo "\n~~~~~~~~~~\n"; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment