最近下载thinkphp视频教程!看到了thinkphp用了一个百度网盘直连下载的功能,觉得很不错哦!利用百度强大的服务器 将自己网站的内容上传到百度,然后在自己网站直接下载,是很多站长需要的功能,特此共享。<?php <br />
/*将本代码保存为bd.php 即可<br>
<br>
利用 file_get_contents和preg_match_all、str_replace三个函数实现!<br>
<br>
将百度网盘的$shareid 和 $uk 加入即可<br>
例如:http://pan.baidu.com/share/link?shareid=489412&uk=101682133<br>
<br>
自己服务器上就 localhost/bd.php?shareid=489412&uk=101682133 就可以自己下载了<br>
*/<br>
$shareid=$_GET['shareid'];<br>
$uk=$_GET['uk'];<br>
<br>
if(isset($shareid) && isset($uk))<br>
{<br>
$str = file_get_contents ("http://pan.baidu.com/share/link?shareid={$shareid}&uk={$uk}");<br>
<br>
preg_match_all('|"dlink\\\":\\\"([^"]+)\\\",\\\"|imsU', $str, $baiduid);<br>
$down=str_replace("\\","",$baiduid[1][1]);<br>
<br>
}<br>
<br>
<br>
<br>
header("Location: ".$down);<br>
<br>
?>
AD:真正免费,域名+虚机+企业邮箱=0元

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

SecLists
SecLists is the ultimate security tester's companion. It is a collection of various types of lists that are frequently used during security assessments, all in one place. SecLists helps make security testing more efficient and productive by conveniently providing all the lists a security tester might need. List types include usernames, passwords, URLs, fuzzing payloads, sensitive data patterns, web shells, and more. The tester can simply pull this repository onto a new test machine and he will have access to every type of list he needs.

WebStorm Mac version
Useful JavaScript development tools

Atom editor mac version download
The most popular open source editor

EditPlus Chinese cracked version
Small size, syntax highlighting, does not support code prompt function

DVWA
Damn Vulnerable Web App (DVWA) is a PHP/MySQL web application that is very vulnerable. Its main goals are to be an aid for security professionals to test their skills and tools in a legal environment, to help web developers better understand the process of securing web applications, and to help teachers/students teach/learn in a classroom environment Web application security. The goal of DVWA is to practice some of the most common web vulnerabilities through a simple and straightforward interface, with varying degrees of difficulty. Please note that this software