Return to Snippet

Revision: 18269
at October 22, 2009 09:24 by AzizLight


Updated Code
$seed = 'JvKnrQWPsThuJteNQAuH';
$hash = sha1(uniqid($seed . mt_rand(), true));

# To get a shorter version of the hash, just use substr
$hash = substr($hash, 0, 10);

Revision: 18268
at September 24, 2009 18:55 by AzizLight


Initial Code
$seed = 'JvKnrQWPsThuJteNQAuH';
$hash = sha1(uniqid($seed . mt_rand(), true));

Initial URL

                                

Initial Description

                                

Initial Title
Generate unique random hash

Initial Tags
php

Initial Language
PHP