limiting bandwith by querying mysql possible?
piotr.sikora at frickle.com
Wed Jan 20 10:06:26 MSK 2010
> 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
Piotr Sikora < piotr.sikora at frickle.com >
More information about the nginx