lundi 1 août 2016

Better way of generating unpredictable, short alphanumeric id for database entries

I'm working on a yellow pages site that has around 1 million entries. I'm currently using random md5 hash as id but think its a bad idea (being longer, consumes more space).

Is there any nicer way of generating an unpredictable, random, short alphanumeric id in PHP other than using uniqid() function. I'm not using auto-increment ids, base64 etc since data scraping would be very easy.




Aucun commentaire:

Enregistrer un commentaire