note 23107 deleted from function.md5 by jimw
| From: | jimw@php.net | Date: | Sat, 08 Feb 2003 19:49:30 +0000 |
| Subject: | note 23107 deleted from function.md5 by jimw | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-43641@lists.php.net to get a copy of this message | ||
[Editor: If you don't want to reinvent the wheel, take a look at uniqid()]
This code will always generate an unique string...
function unique() {
$temp = explode(" ",microtime());
$temp = $temp[0].$temp[1];
settype($temp,'int');
$temp+=time();
return md5($temp);
}