求PHP&JSON大神帮忙
『回复列表(22|显示机器人聊天)』
<?php
header("Content-type: text/html; charset=utf-8");
error_reporting(0);
$key="全英雄联盟";
$ym=file_get_contents("http://i.y.qq.com/s.music/fcgi-bin/search_for_qq_cp?format=json&w=".$key."&n=50");
$a=json_decode($ym,true);
for($i=0;$i<=$a['data']['song']['curnum']-1;$i++){
echo $a['data']['song']['list'][$i]['singer'][0]['name'].' <a href="'.$a['data']['song']['list'][$i]['songurl'].'">'.$a['data']['song']['list'][$i]['songname'].'</a><br>';
}
?>