Subscription Script - limit downloads

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
Timmeh!
Forum Newbie
Posts: 2
Joined: Tue Mar 04, 2008 9:42 pm

Subscription Script - limit downloads

Post by Timmeh! »

Hi, i have a music download site that allows subscriptions for users - they pay $x for a month. However, i want to add a script that limits them to a certain amount of downloads per month once they have subscribed. I've been looking for a while now and can't find anything suitable. Does anyone know of a script that maybe suitable?
Rovas
Forum Contributor
Posts: 272
Joined: Mon Aug 21, 2006 7:09 am
Location: Romania

Re: Subscription Script - limit downloads

Post by Rovas »

You have in your database a table which deals with purchases? If you do add a field with the date of the purchase for each purchased mp3 then simply make a
SQL query that limits the result between the first and the last of the current month: use mktime() for these and watch out for the format in which the dates are kept in your database. Good luck!
Post Reply