好的,我正在向用户的电子邮件发送激活电子邮件链接。我的激活链接工作正常,我想让该链接在 X 分钟后过期。这是我的代码:
$base_url='http://172.16.0.60/WebServices/';
$activation=md5($email.time());
email format to HTML
$mail->Subject = 'Activate Your Account';
$mail->Body = 'Hi, <br/> <br/> We need to make sure you are human. Please verify your email and get started using your Website account. <br/> <br/> <a href="'.$base_url.'activation/'.$activation.'">'.$base_url.'activation/'.$activation.'</a>';
Run Code Online (Sandbox Code Playgroud)
现在我的 .htaccess 文件
RewriteEngine On
RewriteRule ^activation/([a-zA-Z0-9_-]+)$ activation.php?code=$1
RewriteRule ^activation/([a-zA-Z0-9_-]+)/$ activation.php?code=$1
Run Code Online (Sandbox Code Playgroud)
现在我怎样才能让我的链接过期呢?我的数据库中没有时间戳字段。