PHP Anti-theft chain solution?

Source: Internet
Author: User
For example, my site is xxx.com

Resource Station is abc.com

My resource station is only allowed to show on xxx.com or www.xxx.com.

White list restrictions are said to be used

How can i solve this problem with PHP?

Thank you guys!!

Add a little bit. I'm using extraction code to extract resources from the station.

http://xxx.com/link.php/code/

 
  

Reply content:

For example, my site is xxx.com

Resource Station is abc.com

My resource station is only allowed to show on xxx.com or www.xxx.com.

White list restrictions are said to be used

How can i solve this problem with PHP?

Thank you guys!!

Add a little bit. I'm using extraction code to extract resources from the station.

http://xxx.com/link.php/code/

 
  

I can offer a suggestion. Use Cookies and page refer

Apache. htaccess files can be done, specifically how to do, hehe, Baidu's

The Front Plus

$from = Parse_url ($_server[' http_referer ')), if ($from [' Host ']!= ' xxx.com ' && $from [' Host ']!= ' www.xxx.com ') { Die (' You're in hotlinking '); }

Apache Down with rewrite

If I am to do anti-theft chain words: First from the server to better, here is an article is absolutely suitable for beginners:
[Nginx Configuration image Anti-theft chain, simple and efficient, fast, PHP program without change can realize the function of anti-theft chain, why not? ]
Http://www.qixing318.com/article/use-nginx-to-do-a-simple-anti-daolian-website.html
If you have any questions, please leave me a message on SF ^~^

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