rejetto forum

limit downloads

0 Members and 1 Guest are viewing this topic.

Offline bobmanual

  • Occasional poster
  • *
    • Posts: 3
    • View Profile
Brilliant bit of software the only feature i really need now is "limit bandwidth/downloads/kb by user, by ip" any idea of the time scale when this will be implemented.

I am willing to make a generous paypal contribution when this feature is added.  ;)


Offline Fysack

  • Tireless poster
  • ****
    • Posts: 598
  • present picture
    • View Profile
    • Admin

Offline bobmanual

  • Occasional poster
  • *
    • Posts: 3
    • View Profile

Offline SilentPliz

  • Operator
  • Tireless poster
  • *****
    • Posts: 1298
  • ....... chut ! shh!
    • View Profile
Small player. :) You do not promised in euros or pounds sterling. ;)


Offline Mars

  • Operator
  • Tireless poster
  • *****
    • Posts: 2059
    • View Profile
yes Silentpliz, 100€ or 150€ is more confortable   ;D


Offline Fysack

  • Tireless poster
  • ****
    • Posts: 598
  • present picture
    • View Profile
    • Admin
 ;D looking good, you should talk to the godfather  ;)
GOD CAN READ YOUR MIND


Offline rejetto

  • Administrator
  • Tireless poster
  • *****
    • Posts: 13510
    • View Profile
describe with some details the feature you are waiting for


Offline bobmanual

  • Occasional poster
  • *
    • Posts: 3
    • View Profile
"limit bandwidth/downloads/kb by user, by ip" It is in the Todo list.

What i want to do is lets say User A comes to my site and downloads 3 manuals, he can then download no more for 24 hours he gest a simple message he has reached his maximum downloads as a free member for today.

It would also work if i could limit the bandwith per user.  :)

I am currently getting some users trying to download more than 43,000 files which is a pain as i get on average 630000 downloads per month, if i could limit them to say 3 manuals each per day it would really help.
« Last Edit: March 29, 2008, 02:40:14 AM by bobmanual »


Offline MarkV

  • Tireless poster
  • ****
    • Posts: 764
    • View Profile
User quota or IP quota? Unfortunately you can get around IP quota with dynamic IP. For user quota you'd need accounts. Everything has it's pro's and con's.
http://worldipv6launch.org - The world is different now.


Offline bacter

  • Operator
  • Tireless poster
  • *****
    • Posts: 681
    • View Profile
bobmanual

Also your requested feature is in some way in the todo-list, it will be rather complex to implement it without accounts. So i think you should have to wait for HFS Version 4 ....

but

with the macro 'load' feature and a small external program you could use a workaround that may be usable for you. Steps that you would need:

1. A small program that continuously reads your logfile, selecting the registers that contain 'Fully downloaded'. With the information in this line, you could count the downloads or the volume of data downloaded between an elapsed time (24 hours, 3 days ...) and create a table by IP's or username.
You could even complete this table with a whitelist of users or ip's that would have no restrictions..
Save this table as a file, named for example accctrl.dat in a hidden folder.

2.A) Set in your template a variable like 'dl_ok' to 1 that means download allowed.
   B) Include in your template a section that loads the accctrl.dat file, search in this data for user or ip. If you find a match, compare if more download will be allowed or not and set dl_ok to 0 if not.
   C) Establish the way how to restrict access: If the user has exceeded his download rights, you can
        a) Display a different page instead of the filelist.
        or:
        b) modify the filelist section in your template so that the links '<a href....'  are only generated when download allowed: '{.if |dl_ok| .... .. . .  .}'

This is basically a way how you can do what you want.
However, to reduce the risk that a user uses a directlink to your file like 'http://yourdomain/files/manual.doc' instead of trying it using your page, you have to avoid that he can login, using the ip or a cookie with the username to check accesscontrol and avoid then the display of the 'login' button.
If that's not enough and somebody log's in using http://yourdomain/~login' you would have to ban him manually.
your computer has no brain - use your own !


Offline Fysack

  • Tireless poster
  • ****
    • Posts: 598
  • present picture
    • View Profile
    • Admin
wow! That is a nice workaround bacter..
GOD CAN READ YOUR MIND


Offline rejetto

  • Administrator
  • Tireless poster
  • *****
    • Posts: 13510
    • View Profile
i will study the thing as i get the time and will let you know here.
you can click "notify" to get an email when a reply is posted to this topic.