Hola chicos hoy vengo a pedir su ayuda con una API de CURL, ya intente con muchas maneras pero nomas ninguna me sale ya que nunca he usado CURL, espero puedan ayudarme
El Comando curl es este
Código:
curl -u user:password -d https://myanimelist.net/api/anime/search.xml?q=naruto
intente con este codigo pero me da error 403 FORBIDDEN
Código PHP:
$url = 'https://myanimelist.net/api/anime/search.xml?q=naruto';
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_USERPWD, "$username:$password");
curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);
$output = curl_exec($ch);
$info = curl_getinfo($ch);
curl_close($ch);
La Documentacion seria esta
https://myanimelist.net/modules.php?go=api