新浪乐库php解析源码
2023-06-13 09:11:05 时间
新浪乐库php解析源码
作者:matrix 被围观: 1,866 次 发布时间:2013-10-26 分类:零零星星 | 5 条评论 »
这是一个创建于 3231 天前的主题,其中的信息可能已经有所发展或是发生改变。
外链测试:
http://music.sina.com.cn/yueku/i/2850351.html
代码:
function vita_get_url_content($url) {
$ch = curl_init();
$timeout = 5;
curl_setopt ($ch, CURLOPT_URL, $url);
curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt ($ch, CURLOPT_CONNECTTIMEOUT, $timeout);
$file_contents = curl_exec($ch);
curl_close($ch);
return $file_contents;
}
error_reporting(0);
$m=$_GET['id'];
if ($m){
$url="http://music.sina.com.cn/yueku/intro/musina_mpw_playlist.php?id[]=".$m;
$file=vita_get_url_content($url);
$regx='|MP3_URL":"(.*)",|';
preg_match($regx,$file,$rg);
$url = str_replace("\\","",$rg[1]);
$file=vita_get_url_content($url);
$regx='|="(.*)"|';
preg_match($regx,$file,$rg);
} else {
exit('not found ID');
}
Header("HTTP/1.1 303 See Other");
header("location: $rg[1]");
说明:保存为*.php
打开http://serve/*.php?id=2850351 即下载
根据音乐ID来找真实地址 http://music.sina.com.cn/yueku/intro/musina_mpw_playlist.php?id[]=2850351
代码来自:http://zhidao.baidu.com/question/160385986.html
http://v.iask.com/v_play.php?vid=视频ID
如:http://video.sina.com.cn/v/b/10855159-1400488700.html
打开http://v.iask.com/v_play.php?vid=10855159会有视频的真实地址: 第14行
<video>
<result>suee</result>
<timelength>133567</timelength>
<framecount>8385</framecount>
<vname>
<![CDATA[ 任贤齐-花好月圆夜(MV) ]]>
</vname>
<src>400</src>
<durl>
<order>1</order>
<length>133567</length>
<url>
<![CDATA[
http://edge.v.iask.com/6693405.flv?KID=sina,viask&Expires=1382889600&ssig=gildJVy7AM
]]>
</url>
</durl>
<vtags>
<![CDATA[ 任贤齐 花好月圆夜 MV ]]>
</vtags>
<ad>
<![CDATA[ ]]>
</ad>
<vstr>
<![CDATA[ f549fc2ae3611b51682c49072ac1cba7 ]]>
</vstr>
<vip>
<![CDATA[ BAIATFBMVV0BTAEA ]]>
</vip>
<vround>20</vround>
<ext>10855159</ext>
</video>
相关文章
- php校验文件md5防止二次修改源码
- 大型仓库进销存管理系统php源代码,多仓版进销存管理系统PHP源码ERP仓库管理系统php网络版进销存源码…
- php源码中powerby,如何去掉织梦dedecms底部调用cfg_powerby的power by dedecms
- php 中js跳转页面跳转页面,js跳转代码_PHP页面跳转 Js页面跳转代码[通俗易懂]
- 竟然有人质疑我还在用Laravel开发?别忘了PHP是最好的语言。(1)Laravel如何优雅的设置全局变量
- 测试Linux下PHP应用的实现(linux测试php)
- 强大的PHP环境,支持Redis全面提升效能(php支持redis)
- HHVM 3.24 正式发布:不再支持 PHP 5
- 的数据库连接PHP与Oracle数据库的连接技术指南(php与oracle)
- 配置PHP实现MySQL数据库连接(php连接mysql配置)
- 完美安装:PHP环境下实现Redis扩展(php安装redis扩展)
- 轻松设置PHP连接MySQL数据库(php设置连接mysql)
- 安装Linux下的PHP:从源码进行编译(linux源码安装php)
- 使用PHP和MSSQL搭建技术论坛(php mssql 论坛)
- 在Linux环境下,使用PHP发送邮件(linux发送邮件php)
- php入门学习知识点三PHP上传
- php抽奖小程序的实现代码
- 基于php常用函数总结(数组,字符串,时间,文件操作)
- PHP的构造方法,析构方法和this关键字详细介绍
- php使用递归与迭代实现快速排序示例
- PHP对表单提交特殊字符的过滤和处理方法汇总
- php实例分享之通过递归实现删除目录下的所有文件详解