LIMITS

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
darkfire
Forum Newbie
Posts: 4
Joined: Mon May 21, 2007 12:08 am

LIMITS

Post by darkfire »

Hello,
I am making a download website and I need a way to limit the amount of downloads a month to the costumers. does anyone know how to do this?
I need it to limit to the user not the ip.
josh_
Forum Newbie
Posts: 7
Joined: Sun May 20, 2007 6:37 am

Post by josh_ »

in your database, have a column for number of downloads each user has used. before a user makes a download, check that they are not beyond the limit. increment that number for every download your user makes. run a cron job to reset the number at the end of the month. :D
darkfire
Forum Newbie
Posts: 4
Joined: Mon May 21, 2007 12:08 am

Post by darkfire »

do you have a php code that could do that?
thiscatis
Forum Contributor
Posts: 434
Joined: Thu Jul 20, 2006 11:00 am

Post by thiscatis »

the php will be unique because of the tables and methods you use to interact with your database.
Give it a shot and a lot of people will gladly help out improving the code
darkfire
Forum Newbie
Posts: 4
Joined: Mon May 21, 2007 12:08 am

Post by darkfire »

I know the code is going to be unique but i am very new in php and I was wondering if you could give me kinda a script then just put the stuff i would need to change in asterix ex.*put user table name here*
Thank you
Post Reply