Anti-leech-how does PHPApache implement image high-level anti-DDoS collection?

Source: Internet
Author: User
How does PHPApache implement image high-level anti-image acquisition websites? The content page has only one image. You do not need to consider search engine optimization. Is there any way to prevent high-level data collection? The first time I wrote a program, I do not know much about it. I hope your predecessors will advise me. PHP Apache: How to Implement image anti-DDoS pro

For an image website, the content page has only one image. You do not need to consider search engine optimization.

Is there any way to prevent high-level data collection? The first time I wrote a program, I do not know much about it. I hope your predecessors will advise me.

Reply content:

PHP Apache: How to Implement image anti-DDoS pro

For an image website, the content page has only one image. You do not need to consider search engine optimization.

Is there any way to prevent high-level data collection? The first time I wrote a program, I do not know much about it. I hope your predecessors will advise me.

1. If you do not want regular web crawlers to crawl, you can writeRobots.txt, Can refer to Baidu https://www.baidu.com/robots.txt

2. Others are PHP verification.

If (author () {// verify COOKIE/SESSION (if login is not verified, crawlers can still record the cookie on the previous page) // verify USERAGENT (fake) // verify the REFERER (the REFERER can be fake, and some people will turn off the REFERER) // even verify the GET parameter (the parameter can be a random number generated according to certain rules based on time, but the cache becomes invalid.) header ("Content-type: image/jpg"); readfile ("test.jpg ");}

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.