Created
August 27, 2018 14:48
-
-
Save falehenrique/aa7a0a36fb1cd1b7c97e7b15f2b7cbc5 to your computer and use it in GitHub Desktop.
Check the version of TLS - PHP
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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