Re: unique id
| From: | Tom Rogers | Date: | Sat, 26 Jul 2003 09:05:36 +0000 |
| Subject: | Re: unique id | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-156986@lists.php.net to get a copy of this message | ||
Hi,
Saturday, July 26, 2003, 5:58:41 PM, you wrote:
j> Hi there!
j> What's the best way to create uids (unique ids) even when runnig at
j> exactly same time (microseconds)?
j> is this enough ???
j> $r = mt_rand();
j> $uid = uniqid(getmypid() . $r);
j> thanks
j> Jan
I use:
$id = md5(uniqid(rand(),1));
--
regards,
Tom