Skip to content

Instantly share code, notes, and snippets.

@eriweb
Created November 14, 2017 22:02
Show Gist options
  • Save eriweb/f62fb82e8c44abd1f6c4dc02b219401e to your computer and use it in GitHub Desktop.
Save eriweb/f62fb82e8c44abd1f6c4dc02b219401e to your computer and use it in GitHub Desktop.
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://www.howsmyssl.com/a/check");
curl_setopt($ch, CURLOPT_SSLVERSION, 6);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
curl_close($ch);
$tlsVer = json_decode($response, true);
echo "<h1>Your TSL version is: <u>" . ( $tlsVer['tls_version'] ? $tlsVer['tls_version'] : 'no TLS support' ) . "</u></h1>";
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment