This class can be used to generate and validate one time passwords that may expire after a period of time (without using a database or saving the password of any kind).
It generates a code based on a secret key that is valid during a period of time.
The class can also be used to validate the generated code in a different server and check if the code expired.
One time passwords are useful to provide authorization to access restricted resources during a single access.
This class enhances the concept of one time passwords by giving a single access to the resources for a limited period of time.
Manuel Lemos

I have a client who wants to generate a password and give their customers one-time access to their site. After that initial visit, the password expires, and the customer will have to contact them again to access the site.
I downloaded your code, and I see the password (and timer), but I’m not sure how to use that passcode to protect their website. Any suggestions? Thank you!