n4n0bit > HTTP-DownloadLimit > HTTP::DownloadLimit

Download:
HTTP-DownloadLimit-0.1.tar.gz

Dependencies

Annotate this POD

View/Report Bugs
Module Version: 0.1.0   Source  

NAME ^

   HTTP::DownloadLimit - module to set restrictions for files downloading from your webserver

VERSION ^

   This document describes HTTP::DownloadLimit version 0.1.0

SYSNOPSYS ^

   use HTTP::DownloadLimit;

   my $obj = HTTP::DownloadLimit->new
   (
       REMOVE_FILE => 1,
       TYPE_ALLOW => [qw/mp3 avi jpg/],
       FILE_NAME => $ENV{'PATH_INFO'},
       DEBUG => 1
   );

   $obj->Download;

DESCRIPTION ^

   This module allows you to log all downloads, restrict downloadable files extensions and
   concurrent downloads of the same file.

METHODS ^

   Note: there are a bunch of private module which are not discribed here.

   Constructor

       new(ARGS)

   Creates a new instance. Takes arguments as key => value pairs.

   Required arguments are:

       FILE_NAME - default value is taken from $ENV{'PATH_INFO'}. Download link will look like this:
       http://host/cgi-bin/HttpDownloadsControl.pl/Films/fileName.avi

   Optional arguments are:

       REMOVE_FILE - Delete file's parent directory after processing finished. Default: 1
       TYPE_ALLOW  - Downloadable file extensions. Default: avi, mov, mpeg, mkv, mp4, mpg, vob
       BUFFER      - read()'s function buffer size in bytes. Default: 262144
       DEBUG       - Enable logging. Default: 1
       MULTI       - Allow concurrent download of the file. Default: 0
       PATH        - Path to files storage dir. Default: '.'
       LOG         - Path to log file. Default: /var/log/HTTP::DownloadLimit.log

   Main methods:

       Download - No arguments needed. Return http status code or requested file content.

BUGS ^

   If you find the bug, please report it.

AUTHOR ^

   n4n0bit <n4n[dot]lab[at]gmail[dot]com>

COPYRIGHTS ^

   (c) 2008 by n4n0bit <n4n[dot]lab[at]gmail[dot]com>
   This program is free software, you can redistribute it and/or modify it under the same terms as Perl itself
syntax highlighting: