虾米音乐php外链解析

只要知道虾米音乐的ID,就可以解析出此音乐外链地址。

实现方法。新建一个php文件,编写以下代码

<code>
ERROR_REPORTING(0);
$id = substr($_GET["id"], 0, -4);
$content = file_get_contents('http://www.xiami.com/widget/xml-single/sid/'.$id);
preg_match("/<\!\[CDATA\[([^\]].*)\]\]><\/location>/i", $content, $location);
$xiami = ipcxiami($location[1]);
header('Content-Type:application/force-download');
header("Location:".$xiami);

function ipcxiami($location) {
$count = (int)substr($location, 0, 1);
$url = substr($location, 1);
$line = floor(strlen($url) / $count);
$loc_5 = strlen($url) % $count;
$loc_6 = array();
$loc_7 = 0;
$loc_8 = '';
$loc_9 = '';
$loc_10 = '';

while ($loc_7 < $loc_5) {
$loc_6[$loc_7] = substr($url, ($line+1)*$loc_7, $line+1);
$loc_7++;
}
$loc_7 = $loc_5;
while($loc_7 < $count) {
$loc_6[$loc_7] = substr($url, $line * ($loc_7 - $loc_5) + ($line + 1) * $loc_5, $line);
$loc_7++;
}
$loc_7 = 0;
while ($loc_7 < strlen($loc_6[0])) {
$loc_10 = 0;
while ($loc_10 < count($loc_6)) {
$loc_8 .= @$loc_6[$loc_10][$loc_7];
$loc_10++;
}
$loc_7++;
}
$loc_9 = str_replace('^', 0, urldecode($loc_8));
return $loc_9;
}
?>
</code>

然后使用上传至网站。

使用方法:
若上传地址是 http://yefengs.com/xiami.php 那么外链地址就是http://yefengs.com/xiami.php?id=123456.mp3其中123456为虾米的音乐ID号~

1,893次点击 虾米音乐php外链解析已关闭评论
0 thoughts on “虾米音乐php外链解析
添加一条新回复 回到顶部

亲爱的,主人已经关闭了这篇文章的评论 。