Modules
Installation:
Install module as usual, by uploading directory "antileech" to directory "modules" on your site.
Install module on admin side in the same way as other modules.
Set option "Enable log" in module's preference if you need it.
Switch to "Images" menu and upload from there image that would be shown to clients instead of original requested image file.
In a module configuration specify title of page and the displayed text at protection of files against direct loading
In the root of your site (XOOPS_ROOT_PATH) place the following into the file .htaccess
(Make changes to directories and URLs as you needed)

#
#-----------------------------------------------------------------------------
#
# If already exists, then skip the next line
RewriteEngine on

# Root of your site. If already exist, then skip next statment "RewriteBase ...."
# If your site is located in DOCUMENT_ROOT then leave RewriteBase /
# If your site is located in subdirectory of DOCUMENT_ROOT (such as /en ),then change to actual value
# RewriteBase /en

# Protection of images
# Enable direct downloading if field REFERER is empty(usually it is search engines)
RewriteCond %{HTTP_REFERER} !^$
# Enable own site and its all subdomains
RewriteCond %{HTTP_REFERER} !^https?://(www\.)?(subdomain1\.|subdomain2\.)?yoursite\.com/ [NC]
# Enable direct downloading for trusted sites(white list)
RewriteCond %{HTTP_REFERER} !^https?://(www\.)?freindssite1\.com/ [NC]

# (uploads|folder1|folder2) - list of directories to protect, where antileech track access and protect images
# (jpg|jpeg|png|gif) - list of extensions that should be protected
RewriteRule (uploads|folder1|folder2)/(.*)\.(jpg|jpeg|png|gif)$ /modules/antileech/img\.php [NC]

# Protection of files
# Enable direct downloading if field REFERER is empty(usually it is search engines)
RewriteCond %{HTTP_REFERER} !^$
# Enable own site and its all subdomains
RewriteCond %{HTTP_REFERER} !^https?://(www\.)?(subdomain1\.|subdomain2\.)?yoursite\.com/ [NC]
# Enable direct downloading for trusted sites(white list)
RewriteCond %{HTTP_REFERER} !^https?://(www\.)?freindssite1\.com/ [NC]

# (uploads|folder1|folder2) - list of directories to protect, where antileech track access and protect files
# (djvu|pdf|rar|zip) - list of extensions that should be protected
RewriteRule (uploads|folder1|folder2)/(.*)\.(djvu|pdf|rar|zip)$ /modules/antileech/file\.php [NC]



#
#-----------------------------------------------------------------------------
#
Rating 0/5
Rating: 0/5 (0 votes)
Voting is disabled!


Login

Who's Online

365 user(s) are online (19 user(s) are browsing Publisher)


Members: 0


Guests: 365


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Nov 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits

Categories