Changed the URL ID of the file to a to 11 character long uid

This commit is contained in:
Tim Windelschmidt 2016-07-18 19:43:25 +02:00
parent 919585828d
commit 73f514522b
1 changed files with 2 additions and 1 deletions

View File

@ -4,7 +4,8 @@ function mkhash() {
//$hash = getenv('HTTP_USER_AGENT');
//$hash .= getenv('REMOTE_ADDR').time().rand(1,9);
//return md5($hash);
return substr(time(),-6,3).preg_replace('/([ ])/e', 'chr(rand(97,122))', ' ').substr(time(),-3);
//return substr(time(),-6,3).preg_replace('/([ ])/e', 'chr(rand(97,122))', ' ').substr(time(),-3);
return substr(uniqid(), 0, 11);
}