I'm using maxmind GEOIP precision online service to get information about visitor region/city. They are upgrading their protocol to TLS 1.2. I tried to change my code, but they told me that logs indicate that I'm still sending requests using TLS 1.0
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://geoip.maxmind.com/geoip/v2.1/insights/178.166.46.246");
curl_setopt($ch, CURLOPT_USERPWD, $username . ":" . $password);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 2);
curl_setopt($ch, CURLOPT_SSLVERSION, CURL_SSLVERSION_TLSv1_2);
$result = curl_exec($ch);
curl_close($ch);
return $result;
Adding "CURL_SSLVERSION_TLSv1_2" doesn't seem to help. What is that I may be missing here?