Short unique id in php

Posted by Antti on Stack Overflow See other posts from Stack Overflow or by Antti
Published on 2008-11-21T01:05:57Z Indexed on 2010/03/21 18:51 UTC
Read the original article Hit count: 443

I want to create a unique id but uniqid() is giving something like '492607b0ee414'. What i would like is something similar to what tinyurl gives: '64k8ra'. The shorter, the better. The only requirements are that it should not have an obvious order and that it should look prettier than a seemingly random sequence of numbers. Letters are preferred over numbers and ideally it would not be mixed case. As the number of entries will not be that many (up to 10000 or so) the risk of collision isn't a huge factor.

Any suggestions appreciated.

© Stack Overflow or respective owner

Related posts about php

Related posts about uniqueidentifier