Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
01-24-2012, 08:47 PM #1
- Join Date
- Feb 2006
- Thanked 0 Times in 0 Posts
One time use passwords for htaccess possible?
Hi. I set up a password protected page using .htaccess for download of my band's album and created 1000 unique usernames/passwords and printed them on download cards for inclusion in our LPs so that purchasers of the record can also get a digital download as well. Currently however you can use each login/password as often as you like. Is there any way I can have a script check each code as it's entered and make them invalid after a certain number of uses?
01-25-2012, 08:42 AM #2
- Join Date
- Mar 2007
- Thanked 2,224 Times in 2,211 Posts
Instead of having all the passwords in htaccess file, you could have them in a DB and use "HTTP authentication with PHP". Thus, after each login you may set a flag int he DB. (Check your host and find whether it supports this feature)Is there any way I can have a script check each code as it's entered and make them invalid after a certain number of uses?
The Dream is not what you see in sleep; Dream is the thing which doesn't let you sleep. --(Dr. APJ. Abdul Kalam)