How to set the connection expiration time in the email after retrieving the password is shown in the following figure: I have used PHPMailer to send emails.
However, how should I generate a hyperlink to change the password that should be sent to the user, and how should I control its expiration time?
Please give me some advice.
Reply to discussion (solution)
Please give me some advice...
Please give me some advice...
The generated string should be encrypted based on the parameters required on the page. As for the expiration time, you can pass a value of the past sending time in the parameter, when he clicks, he just gets the time and makes a judgment...
I never did. Makr ~~
First, you will send an email address to connect to the Member. the connection parameter can be composed of the domain name of your website, the current time, and the member email address encryption, encryption method you can use the simplest Base64encode, and then separated by commas (,) these three parameters, similar to $ str = Base64encode ("www.aaa.com, aaaaa@qq.com "); when a member clicks a link in his/her mailbox, the member will jump back to your website and process the link on his/her own ~~
Reference http://www.helloweba.com/view-blog-228.html
Record 1 in the database at the time of sending, and compare the time difference during activation.
It has already been implemented. thank you!