设为首页收藏本站网站公告 | 繁体中文
开启辅助访问
查看: 53|回复: 0

网易云音乐

[复制链接]
回帖奖励 5 金钱 回复本帖可获得 5 金钱奖励! 每人限 1 次

7

主题

7

帖子

1547

积分

管理员

Lmmso-婉婷

Rank: 9Rank: 9Rank: 9

积分
1547

最佳新人活跃会员热心会员推广达人宣传达人灌水之王突出贡献优秀版主荣誉管理论坛元老

QQ
发表于 2022-6-19 09:44:46 | 显示全部楼层 |阅读模式

网易云音乐
[PHP] 纯文本查看 复制代码
<?php
include("./API.php");
tongji("tiaoyong");
tongji("wyyyy");
$msg = $_GET['msg'];
$b = $_GET['b'];
$hh=$_GET['hh']?:"\n";
$str = 'http://s.music.163.com/search/get/?src=lofter&type=1&filterDj=true&limit=30&offset=0&s='.$msg.''; 
$str=file_get_contents($str);
$stre = '/{"id":(.*?),"name":"(.*?)","artists":\[{"id":(.*?),"name":"(.*?)","picUrl":(.*?)}\],"album":{"id":(.*?),"name":"(.*?)","artist":{"id":(.*?),"name":"(.*?)","picUrl":(.*?)},"picUrl":"(.*?)"},"audio/'; 
$result = preg_match_all($stre,$str,$trstr);
if($result== 0){
echo "搜索不到与".$_GET["msg"]."的相关歌曲,请稍后重试或换个关键词试试。";
}else{
if($b== null){
for( $i = 0 ; $i < $result && $i < 15 ; $i ++ ){
$ga=$trstr[2][$i];//获取歌名
$gb=$trstr[4][$i];//获取歌手
echo ($i+1).":".$ga."--".$gb."".$hh."";
}
echo "".$hh."发送以上序号进行选择吧!".$hh."";
}else{
$i=($b-1);
$id=$trstr[1][$i];//id
$ga=$trstr[2][$i];//获取歌名
$t=$trstr[11][$i];//图
$gb=$trstr[4][$i];//获取歌手
if(!$id == ' '){die ('列表中暂无序号为『'.$b.'』的歌曲。');}
if($_GET['type']=="json"){
echo 'json:{"app":"com.tencent.structmsg","desc":"音乐","view":"music","ver":"0.0.0.1","prompt":"[分享]'.$ga.'","appID":"","sourceName":"","actionData":"","actionData_A":"","sourceUrl":"","meta":{"music":{"action":"","android_pkg_name":"","app_type":1,"appid":100497308,"desc":"'.$gb.'","jumpUrl":"qq.com","musicUrl":"http://music.163.com/song/media/outer/url?id='.$id.'","preview":"'.$t.'","sourceMsgId":"0","source_icon":"","source_url":"","tag":"网易云音乐","title":"'.$ga.'"}},"text":"","extraApps":[],"sourceAd":""}';
exit;}
if($_GET['type']=="xml"){
echo 'card:1<?xml version=\'1.0\' encoding=\'UTF-8\' standalone=\'yes\' ?><msg serviceID="2" templateID="1" action="web" brief="[分享]网易云音乐" sourceMsgId="0" url="http://music.163.com/song/media/outer/url?id='.$id.'" flag="0" adverSign="0" multiMsgFlag="0"><item layout="2"><audio cover="'.$t.'" src="http://music.163.com/song/media/outer/url?id='.$id.'" /><title>'.$ga.'</title><summary>'.$gb.'</summary></item><source name="" icon="" action="app" a_actionData="com.netease.cloudmusic" i_actionData="tencent100495085://" appid="100495085" /></msg>';
exit;}
echo "±img=".$t."±".$hh."歌名:".$ga."".$hh."歌手:".$gb."".$hh."播放链接:[url=http://music.163.com/song/media/outer/url?id=]http://music.163.com/song/media/outer/url?id=[/url]".$id."";
}}
?>



我有千百个想见你的理由,却缺少一种能见你的身份。
回复 论坛版权

使用道具 举报

ahome_bigavatar:guest
ahome_bigavatar:welcomelogin
懒得打字嘛,点击右侧快捷回复
高级模式
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

Loading...

QQ|手机版|小黑屋|Lmmso-Loser 官网

GMT+8, 2022-9-27 11:39 , Processed in 0.179392 second(s), 53 queries .

Powered by Discuz! X3.4

Copyright © 2001-2020, Tencent Cloud.

快速回复 返回顶部 返回列表