Download Queue

hi, i trying to make to make downloader site, the process was like this:

  1. user enter the site
  2. paste their link
  3. and the wget or downloader program would download the files every
    night
  4. the file saved using the primary key of the database value (number),
    this one example of the table row:
    reqid: 273
    userid: 5
    reqlink: http://127.0.0.1/bla.pdf
    reqtime: 2009-12-03 07:22:01

the file saved on /data/dl/273.data
how can i protect the download link so people wont able to download
directly
but must use some link, such as:
http://bla/get/273 but this link only activated when people has logged
in…

what i mean is, can i make temporary link that can only be accessed
certain
IP and session (of the logged user), one request only, without messing
around and reload nginx’s configuration everytime authenticated people
wan’t
to download the file, and without load file into server side scripting
engine (PHP, etc) because it’s slow when i use server side engine to
serve
the file…

Thanks for care to read this mail…

Regards,
Kiswono
GB

Maybe this will be of help?

http://wiki.nginx.org/NginxHttpAccessKeyModule

Kiswono P. wrote:

into server side scripting engine (PHP, etc) because it’s slow when i


nginx mailing list
[email protected]
nginx Info Page

Phillip B Oldham
ActivityHQ
[email protected] mailto:[email protected]


Policies

This e-mail and its attachments are intended for the above named
recipient(s) only and may be confidential. If they have come to you in
error, please reply to this e-mail and highlight the error. No action
should be taken regarding content, nor must you copy or show them to
anyone.

This e-mail has been created in the knowledge that Internet e-mail is
not a 100% secure communications medium, and we have taken steps to
ensure that this e-mail and attachments are free from any virus. We must
advise that in keeping with good computing practice the recipient should
ensure they are completely virus free, and that you understand and
observe the lack of security when e-mailing us.

On Thu, Dec 3, 2009 at 4:34 PM, Phillip O. [email protected]
wrote:

Maybe this will be of help?

http://wiki.nginx.org/NginxHttpAccessKeyModule

thanks, but using that lib, i still should mess with nginx main
configuration or at least “sites-available/somesite” file ^^ hmm… this
case
hard to crack… i wonder how rapidshare or megaupload did their things…
did
they serve their file using server side script, wouln’t it be slow and
wasting resource…

X-Accel-Redirectthe is the key, i also use this feature, works like a
charm.

The server side script only send the header fast, secure and easy to
setup…

On Thu, Dec 3, 2009 at 18:38, Kiswono P. [email protected] wrote:

thanks, but using that lib, i  still should mess with nginx main
configuration or at least “sites-available/somesite” file ^^ hmm… this case
hard to crack… i wonder how rapidshare or megaupload did their things… did
they serve their file using server side script, wouln’t it be slow and
wasting resource…

You could try X-Accel-Redirect header,
http://wiki.nginx.org/NginxXSendfile

So your script just have to emit the header. File delivery will be
handled by nginx.


Arie Karhendana

oic thank you all, i will try to learn it, if i got it wrong, i will ask
again ^^

btw mr. arie, you’re from indonesia right ^^ nice to meet you…

Arie Karhendana wrote:

On Thu, Dec 3, 2009 at 6:57 PM, Alexander K. [email protected] wrote:

X-Accel-Redirectthe is the key, i also use this feature, works like a
charm.

The server side script only send the header fast, secure and easy to
setup…


Regards,
Kiswono P
GB