Welcome! Log In Create A New Profile

Advanced

Re: limiting bandwith by querying mysql possible?

Piotr Sikora
January 20, 2010 02:10AM
> well parsing access logs, doesn't do the trick because each time a user
> tries to download a file, it actually calls my php script
>
> then the php script forwards with header and NginxXSendfile the file, then
> loses of course control..
>
> so parsing logs won't do any trick becase it's the same effect

Erm... In my opinion it does. You need to parse access logs for accounting
(ie. how many bytes user X downloaded so far) and in your PHP script you
need to verify if user is still allowed to download the next file. You
simply don't send X-Sendfile header when he's not. It should be as easy as
that.

Best regards,
Piotr Sikora < piotr.sikora@frickle.com >


_______________________________________________
nginx mailing list
nginx@nginx.org
http://nginx.org/mailman/listinfo/nginx
Subject Author Posted

limiting bandwith by querying mysql possible?

partysoft December 07, 2009 11:43PM

Re: limiting bandwith by querying mysql possible?

Piotr Sikora December 07, 2009 11:56PM

Re: limiting bandwith by querying mysql possible?

partysoft January 19, 2010 12:08AM

Re: limiting bandwith by querying mysql possible?

Piotr Sikora January 20, 2010 02:10AM

Re: limiting bandwith by querying mysql possible?

agentzh January 19, 2010 08:56PM

Re: limiting bandwith by querying mysql possible?

Robert Mueller January 21, 2010 10:04PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 283
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready