心愿游戏:符合你心愿的游戏!

手机版

百度网盘文件直链PHP代码

时间:2017-06-02 00:00:00 | 来源:网络 | 编辑: 互联网 | 阅读:

百度网盘文件直链PHP代码

通过正则表达式获取百度网盘的文件真实地址,来实现直链的效果,适合一些使用外链的网站使用。

<?php $canshu=$_SERVER["QUERY_STRING"]; if($canshu=="") { die("文件不存在"); } else { $wangzhi="http://pan.baidu.com/share/link?";.$canshu; $file=file_get_contents($wangzhi); $pattern='/a><a class="dbtn cancel singledbtn" href=(.*?)id="downFileButtom">/i'; preg_match_all($pattern,$file,$result); $tempurl=implode("",$result[1]); $fileurlt=str_replace(""","",$tempurl); $fileurl=str_replace("&amp;","&",$fileurlt); header("location:$fileurl"); } ?>

如效果:

百度网盘文件直链PHP代码_wishdown.com

类似游戏

热游排行

更多

关于我们  下载声明  加入我们  意见反馈  网站地图

本站为非营利性个人网站,本站所有游戏来自于互联网,版权属原著所有。如有侵犯你的版权,请发邮件给wishdown2023@163.com

湘ICP备2021017279号-3 公安部备案号:13092602000101

Copyright©2006-2019 www.wishdown.com All rights reserved