• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Imposing restriction on downloads

 
Ranch Hand
Posts: 851
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello,

I want to impose restrictions to not allow any user to download more than 5 images or 2 videos in 24 hours?

The user is common visitor on the website not registered user

Best regards
 
Ranch Hand
Posts: 147
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Sounds like you have a plan.
Good luck.
 
Sheriff
Posts: 22783
131
Eclipse IDE Spring VI Editor Chrome Java Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I think Ed meant to ask what you've done so far, and how you plan on proceeding. We are NotACodeMill, and we believe you should ShowSomeEffort and DoYourOwnHomework. We are more than willing to help you, but that's it - help. We will not give you clear-cut solutions.
 
Farakh khan
Ranch Hand
Posts: 851
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello,

Thanks for your replies. I need just guidance not any code. Can anybody has idea how to implement it. I thought like:
1) I store IP and download attempts in db
2) When user try to download another movie then I check its IP and number of attempts

but its looking me expensive as the program will do many checks that may reduce the efficiency

Is that a good approach or can this be solved through other way round?

Best regards
 
Ed Ward
Ranch Hand
Posts: 147
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Sounds like maybe a case for javax.servlet.http.Cookie
When they first visit, or download, set one and store IP address and maybe some other values for identification as well.
Of course, this won't prevent them from simply clearing the browser cookie cache or changing IP's between download attempts, but if they do not require a user id, there is only so much that can be done I think.
 
Farakh khan
Ranch Hand
Posts: 851
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for your reply

if I make registration and registrant should be able to download then is there any other possibilities?

Best regards
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic