View Single Post
Unread 21 Dec 2005, 17:03   #15
mist
Jolt's best friend
 
mist's Avatar
 
Join Date: Feb 2003
Posts: 2,101
mist is a name known to allmist is a name known to allmist is a name known to allmist is a name known to allmist is a name known to allmist is a name known to all
Re: Basic PHP Help: Global Variables?

Quote:
Originally Posted by meglamaniac
A quick and easy way to get a unique ID is to MD5 the IP address that loaded the page combined with the current timestamp. Unless two computers from the same IP load the same page in the exact same second, there will be no conflicts.

To reduce that chance you can add a random number component to the hash string as well.
i'm fairly sure there are papers out there proving that two different strings can have the same MD5, so that's not neccessarily true.

from a purely mathamatical perspective (i don't know the md5 algorithm) it would seem that there's a 1 in 2^128 chance of the number being duplicated if you're using a 128 bit md5.
__________________
<Karmulian> subtle as a kick in the nuts as always
mist is offline   Reply With Quote