Skip to content

Instantly share code, notes, and snippets.

@falehenrique
Created August 27, 2018 14:48
Show Gist options
  • Save falehenrique/aa7a0a36fb1cd1b7c97e7b15f2b7cbc5 to your computer and use it in GitHub Desktop.
Save falehenrique/aa7a0a36fb1cd1b7c97e7b15f2b7cbc5 to your computer and use it in GitHub Desktop.
Check the version of TLS - PHP
<?php
$curl_version = curl_version();
echo 'You are using this version of SSL Version: ' . $curl_version['ssl_version'] . "\n";
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://api.mercadopago.com/sites/MLB/payment_methods");
curl_setopt($ch, CURLOPT_SSLVERSION, 6);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
if($response) {
if (isset($response[0])) {
echo "= Conected";
}
} else {
echo $response;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment