简体   繁体   English

PHP:什么用于电子邮件确认代码?

[英]PHP: What to use for email confirmation code?

I first tried base64 to encode mail@domain.com but it includes / which breaks my URL which is as http://example.com/verify/<confirmation_code> 我首先尝试使用base64mail@domain.com进行编码,但是它包含/ ,这会破坏我的URL,即http://example.com/verify/<confirmation_code>

I don't want to store in Db, I want on the fly process,provided I can pass my own Salt. 我不想存储在Db中,我想在运行过程中,前提是我可以通过自己的Salt。 What should I use? 我应该使用什么?

您可以对用户ID进行编码,然后将其作为确认代码发送到该位置,以便在其中检查该ID。

I use base_64 for encoding image inks to send to a resizing script this is 1 of the encryptions... 我使用base_64对图像墨水进行编码以发送到调整大小的脚本,这是其中一种加密...

aHR0cDovLzEyM3N0b3Jlcy5jb20vbWVkaWEvY2F0YWxvZy9wcm9kdWN0L2svby9rb29sYXRyb25vbmxpbmVfMjIyMV84OTIwMTk2LmpwZw== aHR0cDovLzEyM3N0b3Jlcy5jb20vbWVkaWEvY2F0YWxvZy9wcm9kdWN0L2svby9rb29sYXRyb25vbmxpbmVfMjIyMV84OTIwMTk2LmpwZw ==

there is no slashes in base_64... are you using base64_encode to encrypt and base64_decode to decrypt? base_64中没有斜杠...您正在使用base64_encode进行加密,并使用base64_decode进行解密吗?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM