note 15692 added to function.uniqid

From: Date: Wed, 26 Sep 2001 19:10:10 +0000
Subject: note 15692 added to function.uniqid
Groups: php.notes 
Request: Send a blank email to php-notes+get-18344@lists.php.net to get a copy of this message
A good four-liner that uses web surfers IP address to create a unique id. md5'ed to add extra length. <? $ip = $REMOTE_ADDR; $randstr = uniqid($ip,1); $randstr = eregi_replace("$ip","","$randstr"); $randstr = md5($randstr); ?> -- http://www.php.net/manual/en/function.uniqid.php http://master.php.net/manage/user-notes.php?action=edit+15692 http://master.php.net/manage/user-notes.php?action=delete+15692 http://master.php.net/manage/user-notes.php?action=reject+15692

« previous php.notes (#18344) next »