I am trying to open a url using curl_init, but didn't get success to get the right responce. I am not able to share the exact url with all of you because of security reasons.
Below is my code
$ch = curl_init("Site URL");
print_r($ch);
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_POST, 0);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, TRUE);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
$response = curl_exec($ch);
echo "Below is Responce <br/>";
echo $response;
print_r($response);
Below is the output
Resource id #2Below is Responce
Output is not throwing any error even if i used error_reporting(1) and report error is enabled in my webhosting php setting
I also checked error logs but nothing. Could you please help me to find the cause. Above code is working from different servers but not from my actual production server. Please guide me to find the cause.