I use CURL in my project, it works fine locally, but if I use the same code that it does not execute, I tried to debug it. The output is as follows:
Took 0 seconds to send a request to https://www.google.co.in
I used the following code example:
$handle=curl_init('https://www.google.co.in'); curl_setopt($handle, CURLOPT_VERBOSE, true); curl_setopt($handle, CURLOPT_RETURNTRANSFER, true); curl_setopt($handle, CURLOPT_SSL_VERIFYPEER, false); $content = curl_exec($handle); if(!curl_errno($handle)) { $info = curl_getinfo($handle); echo '<br/> Took ' . $info['total_time'] . ' seconds to send a request to ' . $info['url']; } else { echo 'Curl error: ' . curl_error($handle); } echo $content;
The problem is in the server, I don't know what to include in php.ini.
Please note that CURL and SSL are enabled on the server. If anyone has encountered similar problems, share solutions.
AnNaMaLaI
source share