SSL Connection problem

I could not run this code on my server. While working on a standard hosting, it doesn’t work on my server due to ssl issues. What can I do?

https://test.erenbostan.com/php.php

var_dump(stream_get_transports());

$data = file_get_contents('https://www.tcmb.gov.tr/kurlar/today.xml');
$xml = simplexml_load_string($data);
print_r($xml);

phpinfo();

Friends like me using Ubuntu 22.04; Similarly, if you get the error “SSL routines::unsafe legacy renegotiation disabled” when you try to connect to certain sites over https, you should add the following line at the end of the openssl.cnf file.

Options = UnsafeLegacyRenegotiation
1 Like