PHP: How to generate a random, unique, alphanumeric string for use in a secret link?

后端 未结 28 2251
隐瞒了意图╮
隐瞒了意图╮ 2020-11-21 22:20

How would it be possible to generate a random, unique string using numbers and letters for use in a verify link? Like when you create an account on a website, and it sends y

28条回答
  •  粉色の甜心
    2020-11-21 23:05

    Here is what I use:

    md5(time() . rand());    
    // Creates something like 0c947c3b1047334f5bb8a3b7adc1d97b
    

提交回复
热议问题