已掉线,重新登录

首页 > 绿虎论坛 > 历史版块 > 编程 > PHP > 源码

标题: 百度网盘外链

作者: @Ta

时间: 2013-03-16

点击: 1356

mp3.php

<?php
$canshu=$_SERVER["QUERY_STRING"];
$wangzhi="http://pan.baidu.com/share/link?".$canshu;
$file=file_get_contents($wangzhi);
$pattern='/<a class="dbtn cancel b-fr" href=(.*?)id="downFileButtom">/is';
preg_match_all($pattern,$file,$result);
$tempurl=implode("",$result[1]);
$fileurlt=str_replace("\"","",$tempurl);
$fileurl=str_replace("&amp;","&",$fileurlt);
header("location:$fileurl")
?>



mp3.php/?shareid=###&uk=###


mp3.php/shareid/###/uk/###.mp3


做QQ空间背景音乐使用url重写
.htaccess

#GZIP#
<ifmodule mod_deflate.c>
DeflateCompressionLevel 9
AddOutputFilterByType DEFLATE text/html text/plain text/xml application/x-httpd-php
AddOutputFilter DEFLATE css js txt php xml html htm
</ifmodule>
#时区#
SetEnv TZ Asia/Hong_Kong
#编码#
AddDefaultCharset UTF-8
#url重写#
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule ^/mp3.php/shareid/([0-9]+)/uk/([0-9]+)\.(mp3|rar|jpg|gif|zip) /mp3.php?shareid=$1&uk=$2 [L]
</IfModule>

[隐藏样式|查看源码]


『回复列表(1|隐藏机器人聊天)』

1. 看我贴子
(/@Ta/2013-03-16 13:30//)

回复需要登录

7月28日 03:28 星期一

本站由hu60wap6驱动

备案号: 京ICP备18041936号-1