Re: generating random id's
| From: | Miles Thompson | Date: | Thu, 09 Feb 2006 17:40:54 +0000 |
| Subject: | Re: generating random id's | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-41206@lists.php.net to get a copy of this message | ||
At 03:26 AM 2/9/2006, JeRRy wrote:
Just to let you all know I used PHP's unique ID generator to generate a unique id for tracking purposes. I than md5 it hide the format a bit, would this be enough? Or can be easily worked out also? Need it pretty tight and keeping the likelyhood down of having multiple listings of id's. It's using 32 chars. JerryYes, I've done something similar. Used the random number generator and chr()'d anything that's printable ascii, looping until I have the desired length, then md5'd it. It works and generates a peculiar value. Miles -- No virus found in this outgoing message. Checked by AVG Anti-Virus. Version: 7.1.375 / Virus Database: 267.15.3/254 - Release Date: 2/8/2006