<?php
ini_set("error_reporting","E_ALL & ~E_NOTICE");
header("Content-type: text/html;charset=utf-8");
date_Default_TimeZone_set("PRC");
//分割线内是可以修改的部分
//*******************************我是淫荡的分割线*******************************//
$bati = "音乐试听外链站";//网站标题
//*******************************我是淫荡的分割线*******************************//
//下面代码请勿修改,否则可能会出现致命错误!
//下面代码请勿修改,否则可能会出现致命错误!
//下面代码请勿修改,否则可能会出现致命错误!
$ururll = "//".$_SERVER["SERVER_NAME"].$_SERVER['PHP_SELF'];
$weburl = str_replace("index.php","",$ururll);//主页地址
$error = "<script>alert('地址错误或者音乐不存在!');top.location.href='".$weburl."'</script>";
$no_img = "http://y.gtimg.cn/mediastyle/global/img/mv_300.png";//mv未加载图片
if(isset($_GET['v'])){
//*******************************播放页面*******************************//
$le = substr($_GET['v'],-11,-10);
$id = substr($_GET['v'],-10).substr($_GET['v'],0,-11);
$main = '';
switch ($le) {
case "M":
//*******************************音乐播放页面*******************************//
$p3_url= "http://m.kugou.com/app/i/getSongInfo.php?hash=".$id."&cmd=playInfo";
$kg_krc = "http://m.kugou.com/app/i/krc.php?cmd=100&timelength=243000&hash=".$id;
$p3_data = curl_get($p3_url);
$p3_json = json_decode($p3_data,true);
$song_url = $p3_json['url'];
$fileName = $p3_json['fileName'];
$singerName = $p3_json['choricSinger'];
$songName = $p3_json['songName'];
$imgUrl = $p3_json['imgUrl'];
if(empty($imgUrl)){$imgUrl = $no_img;}
if(empty($song_url)){$song_url = "http://t.cn/E6Z3g5u";}
$song_img = str_replace("{size}","400",$imgUrl);
$title = $fileName." 在线免费试听下载,".$singerName."歌曲".$songName."mp3下载,LRC滚动歌词_".$singerName."专辑 ,".$songName."(单曲),正版试听下载_".$bati;
$new = curl_get($kg_krc);
$krc = str_replace(array("\r\n", "\r", "\n"),"",$new);
$main .= '<script type="text/javascript" src="//gitee.com/atool/mp34/raw/master/aplayer.js"></script><div id="player" class="aplayer"><pre class="aplayer-lrc-content">'.$krc.'</pre></div><script type="text/javascript">var aplay = new APlayer({element: document.getElementById("player"),narrow:false,autoplay:true,showlrc:true,music:{name:"'.$songName.'",author:"'.$singerName.'",url:"'.$song_url.'",pic:"'.$song_img.'"}});aplay.play();</script></div><div class="plr10" style="background-color:#0889EC;"><a href="'.$song_url.'" target="_blank"><p class="d_w"><i class="fa fa-download" aria-hidden="true"></i> 免费下载</p></a></div>'.random().mv();
break;
case "V":
//*******************************视频播放页面*******************************//
$x_url = "http://m.kugou.com/app/i/mv.php?cmd=100&ext=mp4&hash=".$id;
$data = curl_get($x_url);
preg_match('/songname":"(.*?)",/is', $data, $nm2);
preg_match('/singer":"(.*?)",/is', $data, $nm1);
preg_match('/mvicon":"(.*?)",/is', $data, $img);
preg_match_all('/downurl":"(.*?)",/is', $data, $mp4);
preg_match_all('/backupdownurl":\["(.*?)"\]/is', $data, $bmp4);
$mv_name = $nm1[1]." - ".$nm2[1];
$mv_url = stripslashes($mp4[1][0]);
$title = $mv_name." 在线免费试听下载,".$nm1[1]."歌曲".$nm2[1]."mp4下载,".$nm1[1]."专辑 ,".$nm2[1]."(单曲),正版试听下载_".$bati;
$song_img = stripslashes(str_replace("{size}","400",$img[1]));
$a=array("流畅","标清","高清","超清");
for($i = 0; $i < 3; $i++){
$downurla = stripslashes($mp4[1][$i]);
$downurlb = stripslashes($bmp4[1][$i]);
if($downurla){
$down .= "<li style=\"margin:5px 5px;\">".$a[$i].": <a href=\"".$downurla."\" target=\"_blank\" class=\"btn\"><i class=\"fa fa-download\" aria-hidden=\"true\"></i> 电信线路</a> <a href=\"".$downurlb."\" target=\"_blank\" class=\"btn\"><i class=\"fa fa-download\" aria-hidden=\"true\"></i> 移动线路</a> <a href=\"https://h5.weidian.com/show/201711355982_12.html\" target=\"_blank\" class=\"btn\"><i class=\"fa fa-thumbs-o-up\" aria-hidden=\"true\"></i> 金银花茶</a></li>";
}
}
$main .= "<script type=\"text/javascript\"> function player(url) { var frameid = Math.random(); window.webmvplayer = '<video width=\"100%\" height=\"100%\" controls=\"controls\" autoplay=\"autoplay\" poster=\"$song_img\" object-fit:fill><source src=\"'+url+'\" type=\"video/mp4\"><embed id=\"webmvplayer\" name=\"webmvplayer\" src=\"http://static.kgimg.com/common/swf/video/videoPlayer.swf\" height=\"100%\" width=\"100%\" allowscriptaccess=\"always\" quality=\"high\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\" flashvars=\"skinurl=http%3a%2f%2fstatic.kgimg.com%2fcommon%2fswf%2fvideo%2fskin.swf&aspect=true&url='+url+'&autoplay=true&fullscreen=true&initfun=flashinit\" type=\"application/x-shockwave-flash\" wmode=\"Transparent\" allowfullscreen=\"true\"></embed></video><script>window.onload = function() { parent.document.getElementById(\''+frameid+'\').height = document.body.scrollWidth*0.565+\'px\'; }<'+'/script>'; document.write('<iframe id=\"'+frameid+'\" src=\"javascript:parent.webmvplayer;\" frameBorder=\"0\" scrolling=\"no\" width=\"100%\" frameborder=\"0\" vsspace=\"0\" hspace=\"0\" marginwidth=\"0\" marginheight=\"0\"></iframe>'); } </script><div class=\"main\"><h2 style=\"margin-bottom:10px;width:100%;white-space:nowrap;overflow:hidden;\"><a href=\"?v=".$_GET['v']."\" title=\"".$mv_name."\">".$mv_name."</a></h2></div>
<div style=\"text-align:center;max-width:640px;min-width:320px;margin:10px auto;background-color:#fff;\"><script type=\"text/javascript\">player('".$mv_url."');</script>
<li style=\"margin:5px 5px;\">电脑推荐使用2345浏览器下载视频,<a href=\"//player.youku.com/embed/XMjk4MDE3MTIwMA?autoplay=true\" target=\"_blank\" style=\"color:red;\">观看教程</a></li>".$down."</div>".mv().random();
break;
default:
exit($error);
}
}elseif(isset($_GET['l'])){
//*******************************列表页面*******************************//
$l=$_GET['l'];
$web = '1';
switch ($l){
case "1":
$peg = "网络红歌,最新最好听的网络歌曲,根据网络歌曲人气智能排序网络歌曲排行榜!";
$url = "http://mobilecdn.kugou.com/api/v3/rank/song?pagesize=100&rankid=23784&page=1";
break;
case "2":
$peg = "TOP排行榜,平民化的音乐和歌手,让音乐更贴近你的生活!";
$url = "http://mobilecdn.kugou.com/api/v3/rank/song?pagesize=100&rankid=8888&page=1";
break;
case "3":
$peg = "劲爆DJ舞曲,动感十足!经典劲爆歌曲,流行劲爆,英文劲爆,韩国劲爆歌曲全都有!";
$url = "http://mobilecdn.kugou.com/api/v3/rank/song?pagesize=100&rankid=24971&page=1";
break;
case "4":
$peg = "恋爱的歌,献给热恋中的你们,让爱情变得更加甜美!";
$url = "http://mobilecdn.kugou.com/api/v3/rank/song?pagesize=100&rankid=67&page=1";
break;
case "5":
$peg = "洗脑神曲,神曲之所以被称为神曲,不仅仅是因为旋律,更多的是因为大众喜欢。";
$url = "http://mobilecdn.kugou.com/api/v3/rank/song?pagesize=100&rankid=24574&page=1";
break;
case "6":
$peg = "美拍视频";
$web = 'meipai';
break;
case "7":
$peg = "直播";
$web = 'live';
break;
default:
exit($error);
}
$title = $peg." - ".$bati;
if($web=='meipai'){
$main = '<div class="plr10"><script type="text/javascript" src="http://mp34.butterfly.mopaasapp.com/meipai.php" charset="utf-8"></script></div>';
}elseif($web=='live'){
$main = '<div class="plr10"><script type="text/javascript" src="http://mp34.butterfly.mopaasapp.com/live.php" charset="utf-8"></script></div>';
}else{
$data = curl_get($url);
$json = json_decode($data,true);
$title = $peg." - ".$bati;
$cou