Self-Destructing Password for temporary site access?

I am trying to figure out a way to provide temporary access to a prototype of a website I am building to beta testers, press, bloggers, etc.

I think the ideal solution would be a way to auto-generate temporary, self-destructing (i.e. time-limited) passwords to my site that I could hand out to whoever I needed, and I could rest assured that after a preset amount of time the password would no longer provide access to the my site.

I had this vision of a web service, something like that would simply ask visitors to enter in a password (that I generated using my admin account) and upon entering the code I provide them with, the clock starts ticking and after a preset amount of time has passed, the site would no longer be assessable. Not sure if such a thing exists, or is even possible, but it sounds nice and probably would accomplish what I am trying to accomplish.

Any suggestions would be greatly appreciated… Thanks!

One solution is to generate a temporary password by concatenating random characters from a string of valid password characters. If the temp. password doesn’t already exist, store it in a database table (or ascii file - easier but potentially less secure) with an expiry date/time. When the user tries to log in with a password, check if the server time is less than the password’s expiry time and if it is, let the user log in. If the expiry time has passed, you could delete the password from the database.

This can all be done relatively easily with a server side language like php.