Anti-theft chain PHP code, anti-theft chain PHP code _php Tutorial

Source: Internet
Author: User
Tags rar readfile

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 ...

  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.