Ik krijg vanuit cURL steeds de melding:
Peer's Certificate issuer is not recognized.
Wat moet ik nu doen? Ik heb al gekeken naar CURLOPT_SSL_VERIFYPEER op 0, maar lijkt ook geen soelaas te bieden.
curl_setopt($ch, CURLOPT_VERIFYPEER, 0);
Vreemd genoeg krijg ik dit terug? Terwijl het toch echt een constante is. Dat kent hij blijkbaar hier niet :/
Notice: Use of undefined constant CURLOPT_VERIFYPEER - assumed 'CURLOPT_VERIFYPEER' in
<?php
$username = "secret";
$password = "topsecret";
$url = "https://www.site.nl/api/feed.php";
$ch = curl_init();
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_USERPWD, $username . ':' . $password);
$result = curl_exec($ch);
$xml = simplexml_load_string($result,NULL, LIBXML_NOCDATA);
if(!$xml) {
echo "<p>Feed is stuk: ".curl_error($ch)."</p>";
} else {
// doe de rest
}
curl_close($ch);
?>