Skip to content

Instantly share code, notes, and snippets.

@summercms
Forked from olivierbellone/tls_test.php
Created May 22, 2022 17:37
Show Gist options
  • Select an option

  • Save summercms/32a022d3530e61b947fbaf1f697315cd to your computer and use it in GitHub Desktop.

Select an option

Save summercms/32a022d3530e61b947fbaf1f697315cd to your computer and use it in GitHub Desktop.

Revisions

  1. @olivierbellone olivierbellone created this gist Jul 28, 2016.
    11 changes: 11 additions & 0 deletions tls_test.php
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,11 @@
    <?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";

    ?>