- 注册时间
- 2008-10-24
- 最后登录
- 2012-5-22
- 在线时间
- 1502 小时
- 阅读权限
- 100
- 积分
- 2235
- 帖子
- 586
- 精华
- 1
- UID
- 63056
  
|
本帖最后由 7huo 于 2010-10-24 11:56 编辑
支持rayfile:请复制以下代码保存为m.php到cmp目录下- <?/*
- 新浪地址:http://you.video.sina.com.cn/b/32391253-1734798373.html
- 视屏列表:<m type="2" src="m.php?s=32391253_1734798373" label="名称"/>
- rayfile地址:http://www.rayfile.com/zh-cn/files/c97ce4ca-43ef-11df-ad27-0015c55db73d/
- 视屏列表:<m type="2" src="m.php?r=c97ce4ca-43ef-11df-ad27-0015c55db73d" label="名称"/>
- 特别注明:mv.php?获取网站简称=视屏编号 s:为sina r:为rayfile
- 本程序由:wo0.cn编写,请保留本信息。*/
- function vita_get_url_content($url) {
- $ch = curl_init();
- //$User_Agent = "baiduspider+(+http://www.baidu.com/search/spider.htm)";
- //$Referer_Url = 'http://www.wo0.cn/';
- $timeout = 5;
- curl_setopt ($ch, CURLOPT_URL, $url);
- curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);
- //curl_setopt ($ch, CURLOPT_USERAGENT, $User_Agent);
- //curl_setopt ($ch, CURLOPT_REFERER, $Referer_Url);
- curl_setopt ($ch, CURLOPT_CONNECTTIMEOUT, $timeout);
- $file_contents = curl_exec($ch);
- curl_close($ch);
- return $file_contents;
- }
- $ms=$_GET['s'];
- $mr=$_GET['r'];
- if ($mr){
- $url="http://www.rayfile.com/zh-cn/files/".$mr;
- $file=vita_get_url_content($url);
- $regx='<div class="btn_indown_zh-cn"><a href="([^\<]*)"></a></div>';
- eregi($regx,$file,$rg);
- $file=vita_get_url_content($rg[1]);
- $regx="downloads_url = \['([^\[]*)'\]";
- eregi($regx,$file,$rg);
- $rg[1] = str_replace("zh-cn/","c8c0/zh-cn/",$rg[1]);
- } else {
- $url="http://v.iask.com/v_play.php?vid=".$mvs;
- $file=vita_get_url_content($url);
- $regx="<url><!\[CDATA\[([^\[]*)\]\]><\/url>";
- eregi($regx,$file,$rg);
- }
- //echo $rg[1];
- Header("HTTP/1.1 303 See Other");
- header("location: $rg[1]");
- ?>
复制代码 新浪音乐视屏调用:请复制以下代码保存为m.php到cmp目录下- <?/*
- 新浪地址:http://you.video.sina.com.cn/b/32391253-1734798373.html
- 视屏列表:<m type="2" src="m.php?s=32391253_1734798373" label="名称"/>
- 新浪音乐:http://music.sina.com.cn/yueku/m.php?id=1239642&FLAG_ADDLIST=0
- 视屏列表:<m type="1" src="m.php?m=1239642" label="名称"/>
- 特别注明:m.php?获取网站简称=视屏编号 s:为sina m:为新浪音乐
- 本程序由:wo0.cn编写,请保留本信息。*/
- function vita_get_url_content($url) {
- $ch = curl_init();
- //$User_Agent = "baiduspider+(+http://www.baidu.com/search/spider.htm)";
- //$Referer_Url = 'http://www.wo0.cn/';
- $timeout = 5;
- curl_setopt ($ch, CURLOPT_URL, $url);
- curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);
- //curl_setopt ($ch, CURLOPT_USERAGENT, $User_Agent);
- //curl_setopt ($ch, CURLOPT_REFERER, $Referer_Url);
- curl_setopt ($ch, CURLOPT_CONNECTTIMEOUT, $timeout);
- $file_contents = curl_exec($ch);
- curl_close($ch);
- return $file_contents;
- }
- error_reporting(0);
- $ms=$_GET['s'];
- $m=$_GET['m'];
- 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":"(.*)",';
- eregi($regx,$file,$rg);
- $url = str_replace("\\","",$rg[1]);
- $file=vita_get_url_content($url);
- $regx='="(.*)"';
- eregi($regx,$file,$rg);
- } else {
- $url="http://v.iask.com/v_play.php?vid=".$ms;
- $file=vita_get_url_content($url);
- $regx="<url><!\[CDATA\[([^\[]*)\]\]><\/url>";
- eregi($regx,$file,$rg);
- }
- //echo $rg[1];
- Header("HTTP/1.1 303 See Other");
- header("location: $rg[1]");
- ?>
复制代码 顺便问一下大家都是用的哪里的视屏。如果有好的资源的话可以直接加到全局调用src_handler.php里,更加方便一些。
php版高级应用之简洁链接:
我们把m.php放到cmp下 比如:http://wo0.cn/cmp/
再新建一个.htaccess- <IfModule mod_rewrite.c>
- RewriteEngine on
- # Rewrite URLs of the form 'x' to the form 'index.php?q=x'.
- RewriteCond %{REQUEST_FILENAME} !-f
- RewriteCond %{REQUEST_FILENAME} !-d
- RewriteRule ^m(.*)$ m.php?m=$1 [L,QSA]
- RewriteRule ^s([^r]*)$ m.php?s=$1 [L,QSA]
- RewriteRule ^r(.*)$ m.php?r=$1 [L,QSA]
- </IfModule>
复制代码 现在我们的调用就变成了:
原:m.php?s=32391253_1734798373 新:s32391253_1734798373
原:m.php?m=1239642 新:m1239642
是不是少了些字母,如果不能用说明你的服务器不支持。
个人认为,只是少了些字,对流量不大的站,没意义,不过有朋友提出,也做出来让大家参考一下。
我站上没放这些文件,小站没么多流量来分享,如不支持也没办法。
17173 asp版- <%
- '17173地址:[flash=500,395]http://vlog.17173.com/playercs2008.swf?Flvid=603223[/flash]
- '视屏列表:<m type="2" src="mv.asp?v=603223" label="名称"/>
- '本程序由:wo0.cn编写,请保留本信息。
- On Error Resume Next
- Server.ScriptTimeOut=999999999
- Function GetPage(url)
- Set Retrieval = CreateObject("Microsoft.XMLHTTP")
- With Retrieval
- .Open "Get", url, False, "", ""
- .Send
- GetPage = BytesToBstr(.ResponseBody)
- End With
- Set Retrieval = Nothing
- End Function
- Function BytesToBstr(body)
- dim objstream
- set objstream = Server.CreateObject("adodb.stream")
- objstream.Type = 1
- objstream.Mode =3
- objstream.Open
- objstream.Write body
- objstream.Position = 0
- objstream.Type = 2
- objstream.Charset = "gb2312"
- BytesToBstr = objstream.ReadText
- objstream.Close
- set objstream = nothing
- End Function
- Function GetKey(HTML,Start,Last)
- filearray=split(HTML,Start)
- filearray2=split(filearray(1),Last)
- GetKey=filearray2(0)
- End Function
- v=request("v")
- ch="http://vlog.17173.com/port/pconfig_r.php?id="&v
- '获取网址
- dydb = GetPage(ch)
- '获取内容
- dydb = GetKey(dydb,"MD5=","||")
- 'GetKey函數(dydb,"获取内容之前","获取内容之后")
- response.redirect dydb
- %>
复制代码 |
|