1
I’m trying to use Curl. The problem is that in some pages it works normally, in others I have as output the following error:
SSL certificate problem: unable to get local issuer certificate
Here is my code:
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://www.youtube.com/");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
$output = curl_exec($ch);
echo curl_error($ch);
curl_close($ch);
?>
I am beginner in php and also do not understand much about this Curl tool, but what would be the solution to this error?
I am using Xampp.