note 9510 modified in function.md5 by victor

From: Date: Sat, 24 Aug 2002 08:06:08 +0000
Subject: note 9510 modified in function.md5 by victor
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-35444@lists.php.net to get a copy of this message
[Editor: Take a look at uniqid() since it does what you want. And since PHP 4.2 you don't have to use srand() any longer] U can generate unique string with this way : srand((double)microtime()*1000000); $unique_str = md5(rand(0,9999999)); print $unique_str; It is good for password, cookies or Session_ID (if u're using PHP3) ... LexZEUS --was-- U can generate unique string with this way : srand((double)microtime()*1000000); $unique_str = md5(rand(0,9999999)); print $unique_str; It is good for password, cookies or Session_ID (if u're using PHP3) ... LexZEUS http://www.php.net/manual/en/function.md5.php

« previous php.notes (#35444) next »