百度|程序|防盗链|破解
上传百度的图片无法从外部引用,让许多朋友伤透了脑筋,Verdana同学开发出了一个破解程序,可以用一段PHP代码来解决这个问题.本地清空IE 缓存后测试成功,由于没有主机,所以没有在 Internet 上面测试,有条件的朋友可以帮忙测试一下,谢谢!若有兴趣也在此程序基础上继续优化完善
以下是PHP源码.
/**
* 百度空间相册图片防盗链破解程序 - PHP版
*
* 使用方法:
*
*
*
* @author verdana
* @version 1.0
* @since July 16, 2006
*/
Class Frivoller
{
/**
* The HTTP Version (1.0, 1.1) , Baidu use version 1.1
*
* @var string
*/
protected $version;
/**
* The HTTP response body
*
* @var string
*/
protected $body;
/**
* The HTTP URL
*
* @var string
*/
protected $link;
/**
* An array that containing any of the various components of the URL.
*
* @var array
*/
protected $components;
/**
* The HTTP host
*
* @var string
*/
protected $host;
/**
* The path of required file.
* (e.g. '/verdana/abpic/item/mygirl.png')
*
* @var string
*/
protected $path;
/**
* The HTTP referer, extra it from original URL
*
* @var string
*/
protected $referer;
/**
* The HTTP method, 'GET' for default
*
* @var string
*/
protected $method = 'GET';
/**
* The HTTP port, 80 for default
*
* @var int
*/
protected $port = 80;
/**
* Timeout period on a stream
*
* @var int
*/
protected $timeout = 100;
/**
* The filename of image
*
* @var string
*/
protected $filename;
/**
* The ContentType of image file.
* image/jpeg, image/gif, image/png, image
*
* @var string
*/
protected $contentType;
/**
* Frivoller constructor
*
* @param string $link
*/
public function __construct($link)
{
// parse the http link
$this->parseLink($link);
// begin to fetch the image
$stream = fsockopen($this->host, $this->port, $errno, $errstr, $this->timeout);
if (!$stream) die ("ERROR: $errno - $errstrn");
fputs($stream, $this->buildHeaders());
$this->body = "";
while (!feof($stream)) {
$this->body .= fgets($stream, 4096);
}
// extract picture data
$this->extractBody($this->body);
// send 'ContentType' header for saving this file correctly
// 如果不发送CT,则在试图保存图片时,IE7 会发生错误 (800700de)
// Flock, Firefox 则没有这个问题,Opera 没有测试
header("Content-Type: $this->contentType");
print $this->body;
// save this picture
// file_put_contents('hello.jpg', $this->body);
fclose($stream);
}
/**
* Compose HTTP request header
*
* @return string
*/
private function buildHeaders()
{
$request = "$this->method $this->path HTTP/1.1rn";
$request .= "Host: $this->hostrn";
$request .= "Content-Type: image/jpegrn";
$request .= "Accept: */*rn";
$request .= "Keep-Alive: 300rn";
$request .= "Connection: closern";
$request .= "Referer: $this->refererrn";
$request .= "Cache-Control: max-age=315360000rnrn";
return $request;
}
/**
* Strip initial header and filesize info
*/
private function extractBody(&$body)
{
// The status of link
if(strpos($body, '200 OK') > 0) {
// strip header
$endpos = strpos($body, "rnrn");
$body = substr($body, $endpos + 4);
// strip filesize at nextline
$body = substr($body, strpos($body, "rn") + 2);
}
}
/**
* Extra the http url
*
* @param $link
*/
private function parseLink($link)
{
$this->link = $link;
$this->components = parse_url($this->link);
$this->host = $this->components['host'];
$this->path = $this->components['path'];
$this->referer = $this->components['scheme'] . '://' . $this->components['host'];
$this->filename = basename($this->path);
// extract the content type
$ext = substr(strrchr($this->path, '.'), 1);
if ($ext == 'jpg' or $ext == 'jpeg') {
$this->contentType = 'image/pjpeg';
}
elseif ($ext == 'gif') {
$this->contentType = 'image/gif';
}
elseif ($ext == 'png') {
$this->contentType = 'image/x-png';
}
elseif ($ext == 'bmp') {
$this->contentType = 'image/bmp';
}
else {
$this->contentType = 'application/octet-stream';
}
}
}
// Get the url, maybe you should check the given url
if (isset($_GET['url']) and $_GET['url'] != '') {
new Frivoller($_GET['url']);
}
?>

许多用户在选择智能手表的时候都会选择的华为的品牌,其中华为GT3pro和GT4都是非常热门的选择,不少用户都很好奇华为GT3pro和GT4有什么区别,下面就就给大家介绍一下二者。华为GT3pro和GT4有什么区别一、外观GT4:46mm和41mm,材质是玻璃表镜+不锈钢机身+高分纤维后壳。GT3pro:46.6mm和42.9mm,材质是蓝宝石玻璃表镜+钛金属机身/陶瓷机身+陶瓷后壳二、健康GT4:采用最新的华为Truseen5.5+算法,结果会更加的精准。GT3pro:多了ECG心电图和血管及安

为什么截图工具在Windows11上不起作用了解问题的根本原因有助于找到正确的解决方案。以下是截图工具可能无法正常工作的主要原因:对焦助手已打开:这可以防止截图工具打开。应用程序损坏:如果截图工具在启动时崩溃,则可能已损坏。过时的图形驱动程序:不兼容的驱动程序可能会干扰截图工具。来自其他应用程序的干扰:其他正在运行的应用程序可能与截图工具冲突。证书已过期:升级过程中的错误可能会导致此issu简单的解决方案这些适合大多数用户,不需要任何特殊的技术知识。1.更新窗口和Microsoft应用商店应用程

机器之能报道编辑:吴昕国内版的人形机器人+大模型组队,首次完成叠衣服这类复杂柔性材料的操作任务。随着融合了OpenAI多模态大模型的Figure01揭开神秘面纱,国内同行的相关进展一直备受关注。就在昨天,国内"人形机器人第一股"优必选发布了人形机器人WalkerS深入融合百度文心大模型后的首个Demo,展示了一些有趣的新功能。现在,得到百度文心大模型能力加持的WalkerS是这个样子的。和Figure01一样,WalkerS没有走动,而是站在桌子后面完成一系列任务。它可以听从人类的命令,折叠衣物

第1部分:初始故障排除步骤检查苹果的系统状态:在深入研究复杂的解决方案之前,让我们从基础知识开始。问题可能不在于您的设备;苹果的服务器可能会关闭。访问Apple的系统状态页面,查看AppStore是否正常工作。如果有问题,您所能做的就是等待Apple修复它。检查您的互联网连接:确保您拥有稳定的互联网连接,因为“无法连接到AppStore”问题有时可归因于连接不良。尝试在Wi-Fi和移动数据之间切换或重置网络设置(“常规”>“重置”>“重置网络设置”>设置)。更新您的iOS版本:

php提交表单通过后,弹出的对话框怎样在当前页弹出php提交表单通过后,弹出的对话框怎样在当前页弹出而不是在空白页弹出?想实现这样的效果:而不是空白页弹出:------解决方案--------------------如果你的验证用PHP在后端,那么就用Ajax;仅供参考:HTML code<form name="myform"

watch4pro和gt各自具有不用的特点和适用场景,如果注重功能的全面性、高性能和时尚外观,同时愿意承担较高的价格,那么Watch 4 Pro可能更适合。如果对功能要求不高,更注重电池续航和价格的合理性,那么GT系列可能更适合。最终的选择应根据个人需求、预算和喜好来决定,建议在购买前仔细考虑自己的需求,并参考各种产品的评测和比较,以做出更明智的选择。

THE是什么币种?THE(TokenizedHealthcareEcosystem)是一种数字货币,利用区块链技术,专注于医疗健康行业的创新和改革。THE币的使命是利用区块链技术提高医疗行业的效率和透明度,推动各方之间更高效的合作,包括患者、医护人员、制药公司和医疗机构。THE币的价值和特点首先,THE币作为一种数字货币,具备了区块链的优势——去中心化、安全性高、交易透明等,让参与者能够信任和依赖这个系统。其次,THE币的独特之处在于它专注于医疗健康行业,借助区块链技术改造了传统医疗体系,提升了

不,我们不能将顶级类声明为私有或受保护。它可以是公共或默认(无修饰符)。如果没有修饰符,则应该具有默认访问权限。语法//Atoplevelclass publicclassTopLevelClassTest{ //Classbody}如果将一个顶级类声明为私有(private),编译器将会报错,提示“在此处不允许使用修饰符private”。这意味着顶级类不能是私有的,同样也适用于protected访问


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

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

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

Dreamweaver Mac version
Visual web development tools

ZendStudio 13.5.1 Mac
Powerful PHP integrated development environment

SublimeText3 Mac version
God-level code editing software (SublimeText3)

mPDF
mPDF is a PHP library that can generate PDF files from UTF-8 encoded HTML. The original author, Ian Back, wrote mPDF to output PDF files "on the fly" from his website and handle different languages. It is slower than original scripts like HTML2FPDF and produces larger files when using Unicode fonts, but supports CSS styles etc. and has a lot of enhancements. Supports almost all languages, including RTL (Arabic and Hebrew) and CJK (Chinese, Japanese and Korean). Supports nested block-level elements (such as P, DIV),
