Skip to content

Instantly share code, notes, and snippets.

View olivierbellone's full-sized avatar

Olivier Bellone olivierbellone

View GitHub Profile

Keybase proof

I hereby claim:

  • I am olivierbellone on github.
  • I am olivierbellone (https://keybase.io/olivierbellone) on keybase.
  • I have a public key whose fingerprint is 71FE 51E3 B40B 3937 EDE2 CD19 DBEC 1477 4987 F432

To claim this, I am signing this object:

<?php
$c = curl_init();
curl_setopt($c, CURLOPT_URL, "https://api.stripe.com/healthcheck");
curl_setopt($c, CURLOPT_RETURNTRANSFER, true);
$rbody = curl_exec($c);
if ($rbody === false) {
$errno = curl_errno($c);
$msg = curl_error($c);
curl_close($c);
<?php
function get_tls_version($sslversion = null)
{
$c = curl_init();
curl_setopt($c, CURLOPT_URL, "https://www.howsmyssl.com/a/check");
curl_setopt($c, CURLOPT_RETURNTRANSFER, true);
if ($sslversion !== null) {
curl_setopt($c, CURLOPT_SSLVERSION, $sslversion);
}
@olivierbellone
olivierbellone / tls_test.php
Created July 28, 2016 09:58
Simple TLS version test for PHP, using howsmyssl.com
<?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";
@olivierbellone
olivierbellone / StripeSpark1OAuthApp.java
Created November 22, 2015 16:02
Stripe OAuth Example -- Java 7 + Spark 1
package com.stripe;
import java.lang.reflect.Type;
import java.util.HashMap;
import java.util.Map;
import java.net.URI;
import static spark.Spark.get;
import spark.ModelAndView;
import spark.Request;