From 73f514522bd9bfdd6aa463c0d9d662b66e563d6b Mon Sep 17 00:00:00 2001 From: Tim Windelschmidt Date: Mon, 18 Jul 2016 19:43:25 +0200 Subject: [PATCH] Changed the URL ID of the file to a to 11 character long uid --- include/functions.inc.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/functions.inc.php b/include/functions.inc.php index f9e4643..d6796d8 100644 --- a/include/functions.inc.php +++ b/include/functions.inc.php @@ -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); }