It's working code as it works for me, it looks like you are missing the SSL cert piece.
PHP Code:
new g_szCurlSSLCert[ 64 ];
iLen = get_modname( g_szCurlSSLCert , charsmax( g_szCurlSSLCert ) );
g_szCurlSSLCert[ iLen++ ] = '/';
copy( g_szCurlSSLCert[ ( iLen += get_datadir( g_szCurlSSLCert[ iLen ] , charsmax( g_szCurlSSLCert ) - iLen ) ) ] , charsmax( g_szCurlSSLCert ) - iLen , "/curl_cert/cacert.pem" );
if ( !file_exists( g_szCurlSSLCert , true ) )
{
set_fail_state( "curl SSL certificate not found.^nPlace here: %s^nVisit: https://curl.se/docs/caextract.html" , g_szCurlSSLCert );
return;
}
//Then add
curl_easy_setopt( cURLHandle , CURLOPT_SSL_VERIFYPEER , 1 );
curl_easy_setopt( cURLHandle , CURLOPT_CAINFO , g_szCurlSSLCert );
__________________