best practice to generate random token for forgot password
问题 I want to generate identifier for forgot password . I read i can do it by using timestamp with mt_rand(), but some people are saying that time stamp might not be unique every time. So i am bit of confused here. Can i do it with using time stamp with this ? Question What's best practice to generate random/unique tokens of custom length? I know there are lot of questions asked around here but i am getting more confused after reading different opinion from the different people. 回答1: In PHP, use