Generating unique 6 digit code

前端 未结 6 2085
鱼传尺愫
鱼传尺愫 2020-12-28 10:06

I\'m generating a 6 digit code from the following characters. These will be used to stamp on stickers.
They will be generated in batches of 10k or less (before printing)

6条回答
  •  攒了一身酷
    2020-12-28 11:04

    I had the same problem, and I found very impressive open source solution:

    http://www.hashids.org/php/

    You can take and use it, also it's worth it to look in it's source code to understand what's happening under the hood.

提交回复
热议问题