Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New Coder
    Join Date
    Feb 2006
    Posts
    44
    Thanks
    2
    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?

    Thanks!
    jack

  • #2
    Supreme Master coder! abduraooft's Avatar
    Join Date
    Mar 2007
    Location
    N/A
    Posts
    14,852
    Thanks
    160
    Thanked 2,223 Times in 2,210 Posts
    Blog Entries
    1
    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?
    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)
    The Dream is not what you see in sleep; Dream is the thing which doesn't let you sleep. --(Dr. APJ. Abdul Kalam)


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •