Reputation: 138
I'm looking for a simple solution for paid memberships on my website.
Basically all I need is a mysql value to change. (Changing account type.) I know you can use Paypal IPN to do this easily.
The problem is after x months the account needs to be changed back. What is the best way to do this? Do I have to run code every day to check expiry times? Or is there something easier?
Upvotes: 1
Views: 978
Reputation: 10781
This wholly depends on whether you need it to be 100% accurate in your database or not.
If the only time you care about expired accounts is when the person is trying to use your service, I'd just perform the check at an appropriate time (say on logon).
If you need it to be accurate (to the day) I'd look at using cron
or a cron-like system to do your database update during off-peak times.
Upvotes: 6