Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

The method of hotlink protection for downloading channels of dedecms software

2025-03-26 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/02 Report--

This article is about the methods of hotlink protection for downloading channels of dedecms software. The editor thought it was very practical, so I shared it with you as a reference. Let's follow the editor and have a look.

Dedecms software download channel how to protect against hotlink?

Due to the revision of the website, many previous websites are linked to our inner pages. It leads to a lack of user experience and prevents some websites that steal our resources.

The shortcomings of dede as a software station

That is, when someone reposts your download, they directly repost to http://www.xxx.com/plus/download.php..........

It can be downloaded by directly opening the download address list page, which consumes resources but cannot bring users.

After research, we finally got the hotlink protection for downloading the software channel, and we all shared the code. I hope we can use it.

The modified function is

If the software information page address is: https://www.xxx.net/soft/1.htm

Download address: https://www.xxx.net/plus/download.php?.........

Judge where it comes from

If it wasn't for https://www.xxx.net/soft/1.htm,

Jump directly to https://www.xxx.net/soft/1.htm

If the source is https://www.xxx.net/soft/1.htm, display the download address.

Description: the following code is a direct copy of my own station, I enable the site-wide Thunderbolt download, open the automatic use of Thunderbolt download, you can also make small changes, do not allow the use of Thunderbolt download

It is easy to modify those that do not use Thunderbolt: delete the code related to Thunderbolt and just quote $link.

The file to be modified is / plus/download.php

Demo:

Https://www.xxx.net/do/plus/download.php?open=0&aid=20975&cid=3

You must enter from the https://www.xxx.net/codes/20975.html page to be normal.

The code is as follows:

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report