Re: UNIQUE_ID

From: Date: Sun, 20 Aug 2000 18:42:20 +0000
Subject: Re: UNIQUE_ID
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-12655@lists.php.net to get a copy of this message
This should be unique within twice a second. md5(microtime()); or you can use microtime() (since it gives seconds+microseconds since the epoc) and run it thought just about any hash and get a unique ID. Granted, you may also want to give it some string that only you know about if keeping people from guessing it is important to you. IE. md5(microtime().'You\'re random string'); -jeremy brand _______________________________________________________________________ GnuPG Fingerprint: 9F5E 95E0 1CC2 E054 84EA 6099 8ACD 9DBA D2C0 5EA9 _ http://www.JeremyBrand.com/Jeremy/Brand/Jeremy_Brand.html for more __ > I need to do the following: create a unique_id, which would change every > second(or twice in a second). Get the IP and useragent and random number > and put them all to one string. > > How could I create the changing unique_id? If possible, you could give > your version of the whole code. Just for comparing. > > > Thanks, > Siim EInfeldt > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > For additional commands, e-mail: php-general-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net > >

« previous php.general (#12655) next »