Hello admin,
I used Curl in PHP, but it didn’t and work, it’s give an empty result for me so that I just printed the error message using this following code
if(curl_exec($curl) === false)
{
echo 'Curl error: ’ . curl_error($curl);
}
else
{
echo ‘working perfectly’;
}
But when I check if the Curl is enable or disable using following code, it says “enabled”
echo 'Curl: ', function_exists(‘curl_version’) ? ‘Enabled’ . “\xA” : ‘Disabled’ . “\xA”;
Is there is any solution for using Curl in http connection?
Also, can you provide your website domain? Are you using free hosting or premium (or non-free)?
EDIT:
Even though it returns cURL as “Enabled”, it is just mock and is actually not a thing.
If you want to use cURL, I suggest another free hosting, such as Heroku.
@wackyblackie It is available on free hosting, you would have to be stupid to disable it.
The SSL issues all came from the OpenSSL update a couple of years ago. I’m supprised that the code you tried did not work - after a quick search I found this bit of code. It changes the SSL version/type to one that OpenSSL hopefully supports.
curl_setopt($curl, CURLOPT_SSLVERSION, 3); // Sets cURL to ue SSLv3 rather than TLSv1