List Info

Thread: note 72738 added to function.uniqid




note 72738 added to function.uniqid
user name
2007-01-31 02:13:41
The example given in this document for a "better
token" should be:

<?php
$better_token = uniqid(md5(rand()), true);
?>

As it is now, the result isn't guaranteed to be unique,
because MD5 has collisions.
----
Server IP: 64.71.164.2
Probable Submitter: 72.192.146.68
----
Manual Page -- http
://www.php.net/manual/en/function.uniqid.php
Edit        -- https://master
.php.net/note/edit/72738
Del: integrated  -- h
ttps://master.php.net/note/delete/72738/integrated
Del: useless     -- http
s://master.php.net/note/delete/72738/useless
Del: bad code    -- htt
ps://master.php.net/note/delete/72738/bad+code
Del: spam        -- https:/
/master.php.net/note/delete/72738/spam
Del: non-english -- 
https://master.php.net/note/delete/72738/non-english
Del: in docs     -- http
s://master.php.net/note/delete/72738/in+docs
Del: other reasons-- https://mast
er.php.net/note/delete/72738
Reject      -- https://mast
er.php.net/note/reject/72738
Search      -- https://
master.php.net/manage/user-notes.php

-- 
PHP Notes Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub
.php


[1]

about | contact  Other archives ( Real Estate discussion Medical topics )