PHP: Short id like Youtube, with salt

前端 未结 2 1341
夕颜
夕颜 2021-02-06 09:56

I need to encode/encrypt database ids and append them to my URLs. Security is not an issue I am trying to deal with, but I am looking for something with moderate security. The m

2条回答
  •  情话喂你
    2021-02-06 10:59

    Could you not just use PHP's uniqid function to generate a faux-random string from the current timestamp? Then save this alpha-numeric string in the video record at upload time.

提交回复
热议问题