Anti-theft chain PHP code, anti-theft chain PHP code
Detailed Description: http://php.662p.com/thread-456-1-1.html
PHP set code for anti-theft chain
Instead of using PHP to consume more resources, it is recommended to start with the server and change the Apache configuration
The following is the PHP implementation of the code, Xxx.mp3 is the actual address of your music file, when the external spread only the PHP address, MP3 address is not public
if (Strpos ($_server[' http_referer '), ' qq.com ')!== FALSE) {
Header (' http/1.1 404 Not Found ');
Exit
}
ReadFile (' Xxx.mp3 ');
?>
Teach the code meaning for PHP to open the anti-theft chain picture
I beginner PHP, can only help you to explain the meaning of this expression, as to account for the server bandwidth, because there is no contact, not understand.
The ReadFile () function reads a file and writes to the output buffer, and if "fopen wrappers" has been activated, the URL can be used as the file name in this function.
The argument in your example $_get[' URL ' should be an array, ' URL ' is an index, the value should be a URL address, so the combination of the above ReadFile () function, is to write the URL address as a file name to the output cache.
http://www.bkjia.com/PHPjc/870656.html www.bkjia.com true http://www.bkjia.com/PHPjc/870656.html techarticle anti-theft chain PHP code, anti-theft chain PHP code? php/* use: Save the above code as dao4.php, such as Test Validatecode.rar in the site http://www.niuzen.com, then use the following code ...