我想把专辑id保存在deezer上。这是我的请求,但是$resultat_brut_deezer是空的。为什么?谢谢你的帮助。
$url_d = 'https://api.deezer.com/search?q=album:%22'.$album_title.'%22%20artist:%22'.$nom_aut.'%22';
$datadeezer =array('index'=>'0','limit'=>'1','output'=>'json');
$options_d = array(
'http' => array(
'header' => "Content-type: application/x-www-form-urlencoded\r\n",
'method' => 'GET',
'content' => "&".http_build_query($datadeezer)
)
);
$context_d = stream_context_create($options_d);
$resultat_brut_deezer = file_get_contents($url_d, true, $context_d);
$resultat_json_d=json_decode($resultat_brut_deezer);发布于 2017-01-05 16:12:22
我找到了。$url_d = 'https://api.deezer.com/search?q=album:%22'.$album_title.'%22%20artist:%22'.$nom_aut.'%22';
替换为:'https://api.deezer.com/search?q=album:%22'.urlencode($basic'title'->value.'%22');= $url_d
https://stackoverflow.com/questions/41463743
复制相似问题