Lambneck Posted May 27, 2008 Share Posted May 27, 2008 I am trying to make a payment system that generates temporary passwords. a specific page will be password protected, the user pays to see it, then gets emailed a password that is good for a month. after a month the password will no longer work. ...or something to that effect. Basically I would just like to know where to begin with this. If you've done this before or know of a good tutorial that could get me started any advice would be appreciated. Link to comment https://forums.phpfreaks.com/topic/107531-expiring-password/ Share on other sites More sharing options...
p2grace Posted May 27, 2008 Share Posted May 27, 2008 Which part are you having trouble with? Basically what you would do is upon paying for the one-month subscription, the system would generate the password using an md5 hash of some sort, and then storing that in the database along with an expiration date. When that user tries to access the page check to see if the password exists, and if it does if the current date is less than or equal to the expiration date. If it is let them view the page. Link to comment https://forums.phpfreaks.com/topic/107531-expiring-password/#findComment-551212 Share on other sites More sharing options...
deadonarrival Posted May 27, 2008 Share Posted May 27, 2008 Or better would be to put the date of purchase, then let them extend that if they want. If the date now is greater than the date of purchase+28 days, refuse access. That way you can extend the date if you put special offers on. On second thought, you could just add days to each person's expiry date. Hmm. It's basically a very slightly modified version of the standard user/password -> all access variant of login systems. Read up on login systems. Link to comment https://forums.phpfreaks.com/topic/107531-expiring-password/#findComment-551218 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.