cURL not response

hi, i created simple script load data from extarnal site with php cURL and it work well my local host and my server. but it not work on Exeoutput. i checked cURL Extantion. can you help me about this. thank you. this is sample code, it work localhost and my server

        $curl = curl_init();

        curl_setopt_array($curl, array(
            CURLOPT_URL => 'https://',
            CURLOPT_RETURNTRANSFER => true,
            CURLOPT_CUSTOMREQUEST => 'POST',
            CURLOPT_POSTFIELDS =>'{
                "email": "mail",
                "password": "mypassword"
            }',
            CURLOPT_HTTPHEADER => $curlHeader
        ));

        $response = curl_exec($curl);
        curl_close($curl);
        echo $response;

Hello,
you need a CA Root Certificates Bundle
Download cacert.pem from here curl - Extract CA Certs from Mozilla
Place it as cacert.pem the directory you compiled executable resides.
Let php settings
curl.cainfo
and openssl.cainfo point to the cacert.pem file

1 Like