Single

【PHP源码】随机QQ音乐新歌榜歌曲PHP源码

<?php
//小杰原创
$url='https://u.y.qq.com/cgi-bin/musicu.fcg?-=getUCGI992781615482289&g_tk=5381&loginUin=2772655946&hostUin=0&format=json&inCharset=utf8&outCharset=utf-8&notice=0&platform=yqq.json&needNewCode=0&data={"detail":{"module":"musicToplist.ToplistInfoServer","method":"GetDetail","param":{"topId":26,"offset":0,"num":300,"period":"'.date('Y').'_'.date('W').'"}},"comm":{"ct":24,"cv":0}}';
$curl=curl_init();
curl_setopt($curl,CURLOPT_URL,$url);
curl_setopt($curl,CURLOPT_SSL_VERIFYPEER, FALSE);
curl_setopt($curl,CURLOPT_SSL_VERIFYHOST, FALSE);
curl_setopt($curl,CURLOPT_RETURNTRANSFER,1);
$result=curl_exec($curl);
curl_close($curl);
$data=json_decode($result,true);
$rand=rand(1,300);
echo $data["detail"]["data"]["data"]["song"][$rand]["title"];

 

暂无评论

发表评论