Skip to content

Instantly share code, notes, and snippets.

@eriweb
Created November 14, 2017 22:02

Revisions

  1. eriweb created this gist Nov 14, 2017.
    10 changes: 10 additions & 0 deletions gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,10 @@
    <?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>";