How to prevent hotlinking in download.php of Dreamweaver download channel?
Dreamweaver DEDECMS download channel download.php anti-hotlinking
Recommended learning: Dreamweavercms
1.Download channel anti-hotlinking function The link display method must be set in the software channel settings: Request to enter the download address list page
2. Modify /plus/download.php
The modification method is as follows:
Find:
$row = $dsql->GetOne("Select $vname From ".$cu->ChannelInfos['addtable']." where aid='$aid'");
Add
if(!strstr($_SERVER['HTTP_REFERER'],$arcurl)) { echo "<script language='javascript'>location=\"$arcurl\";</script>"; }
above it and that’s it.
The above is the detailed content of How to prevent hotlinking in download.php of DreamWeaver download channel. For more information, please follow other related articles on the PHP Chinese website!