KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I am using CURL in my project, Its working fine locally but if i use the same code its not executing, I tried to debug it. The output as follows : Took 0 seconds to send a request to https://www.google.co.in I used the following sample code: $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 server, I don't know what to enable in php.ini. Please note that in server CURL and SSL is enabled. If anyone faced similar problems, share solutions please.
Tags (comma-separated)
Save Edits
Cancel