Skip to content

Instantly share code, notes, and snippets.

@caasig
Forked from olivierbellone/tls_test.php
Created April 19, 2018 04:15
Show Gist options
  • Select an option

  • Save caasig/70ff56c636b5a81439bff028ca051ac7 to your computer and use it in GitHub Desktop.

Select an option

Save caasig/70ff56c636b5a81439bff028ca051ac7 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";

    ?>