'.$str.''; } echo '
'.PHP_EOL;

$ch = curl_init('https://www.howsmyssl.com/a/check');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$data = curl_exec($ch);
$json = json_decode($data);
echo '(default) '.red($json->tls_version).' recommended if TLS 1.2 everything is set'.PHP_EOL;

curl_setopt($ch, CURLOPT_SSLVERSION, CURL_SSLVERSION_TLSv1_2);
$data = curl_exec($ch);
$json = json_decode($data);
echo 'forced by CURL_SSLVERSION_TLSv1_2 '.red($json->tls_version).' if warning before, your PHP version is obsolete, better go to 5.6.'.PHP_EOL;

curl_setopt($ch, CURLOPT_SSLVERSION, 6);
$data = curl_exec($ch);
$json = json_decode($data);
echo 'forced by 6 '.red($json->tls_version).' if succeed, your hosting is really bad but can cope with (require code adjustment)'.PHP_EOL;

echo PHP_EOL.PHP_EOL.'If none of the abose display TLS1.2, your hosting is not TLS1.2 compatible. (change hoster)'.PHP_EOL;