search
Homephp教程PHP源码PHP5盗链函数(referfile)

<script>ec(2);</script>



PHP5盗链函数(referfile)
作者:axgle

功能:任何以‘HTTP_REFERER’为主要特征的防盗链技术将通通失效,顷刻间便灰飞烟灭。

/**
@title:PHP5盗链函数
@author:axgle
@filename:referer.php
@contents:This is a demo that show referer made success
*/

if($_GET[''id'']) {
        echo $_SERVER[''HTTP_REFERER''];
} else {
        echo referfile(''http://localhost/referer.php?id=1'',''http://axgle.is.good/'');
      
}

function referfile($url,$refer='''') {
        $opt=array(''http''=>array(''header''=>"Referer:$refer"));
        $context=stream_context_create($opt);
        return file_get_contents($url,false,$context);
}

?>

Statement
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

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

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

Atom editor mac version download

Atom editor mac version download

The most popular open source editor

MinGW - Minimalist GNU for Windows

MinGW - Minimalist GNU for Windows

This project is in the process of being migrated to osdn.net/projects/mingw, you can continue to follow us there. MinGW: A native Windows port of the GNU Compiler Collection (GCC), freely distributable import libraries and header files for building native Windows applications; includes extensions to the MSVC runtime to support C99 functionality. All MinGW software can run on 64-bit Windows platforms.

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

WebStorm Mac version

WebStorm Mac version

Useful JavaScript development tools