Docs ModTriggerBeforeDownload » History » Revision 10

Revision 9 (stbuehler, 2009-02-17 10:09) → Revision 10/13 (Shtirlic, 2009-03-09 14:34)

h1. Module mod_trigger_b4_dl - Trigger before Download 


 *Module mod_trigger_b4_dl* 

 h2. Description 

 Anti Hotlinking: 
 * if user requests "download-url" directly, the request is denied and he is redirected to "deny-url" 
 * if user visits "trigger-url" before requesting "download-url", access is granted 
 * if user visits "download-url" again after "trigger-timeout" has elapsed, the request is denied and he is redirected to "deny-url" 

 The trigger information is either stored locally in a gdbm file or remotely in memcached. 

 h2. Requirements 

 * libpcre 
 * libgdbm or libmemcache (install the C client API,visit and for detail.) 

 h2. Example config 

 trigger-before-download.gdbm-filename = "/home/weigon/testbase/trigger.db" 
 trigger-before-download.memcache-hosts = ( "" ) 
 trigger-before-download.trigger-url = "^/trigger/" = "^/download/" 
 trigger-before-download.deny-url = "" 
 trigger-before-download.trigger-timeout = 10 

 If both @trigger-before-download.gdbm-filename@ and @trigger-before-download.memcache-hosts@ is set gdbm will take precedence. 

 h2. Installation 

 memcached should be started with the option -M as we don't want to remove entry if the memory is full.