Failed to connect to api.binance.com port 443

hello, i’m getting error 443 Failed to connect when using api via curl in php.
any idea why?

$endpoint = ‘https://api.binance.com/api/v3/time/’;

    try

    {

        $curl = curl_init();

        if (FALSE === $curl)

            throw new Exception('Failed to initialize request.');

        

        curl_setopt_array($curl, array(

            CURLOPT_URL => $endpoint,

            CURLOPT_RETURNTRANSFER => true,
        ));

        $response = curl_exec($curl);

        if (FALSE === $response)

            throw new Exception(curl_error($curl), curl_errno($curl));

        $http_status = curl_getinfo($curl, CURLINFO_HTTP_CODE);

        if (200 != $http_status)

            throw new Exception($response, $http_status);

        curl_close($curl);

Not a master of this php curl library, but have a try with command line curl.

if this works for you, then there is no problem connecting with API server, i would suggest to look deeper into how this library works for sending requests.


curl  -v 'https://api.binance.com/api/v3/time/'

Maybe other library like ‘guzzlehttp’ is more easier to intergrade?