I'm trying to use Curl. The problem is that in some pages it works normally, in others I have 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'm a beginner in php and I also do not understand much about this Curl tool, but what would be the solution to this error?
I'm using Xampp.