From db140f58c61651c0deb5bb2741ff982fa3ba85ee Mon Sep 17 00:00:00 2001 From: Arctic Code Date: Mon, 24 Feb 2014 09:57:18 -0600 Subject: [PATCH] Reduce address space for generated links There have been roughly only 1000 links made since v3.1 a 7 character alphanumeric address space is huge. My link shortener should be happy with a 3 or 4 character alphanumeric address space. --- api/api.backend.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/api.backend.php b/api/api.backend.php index 8a64381..06e4525 100644 --- a/api/api.backend.php +++ b/api/api.backend.php @@ -62,7 +62,7 @@ class api{ } } if(checkRemoteFile($link) !== true) return "
Dead Link: $link
"; - $short = substr(number_format(time() * mt_rand(),0,'',''),0,10); + $short = substr(number_format(time() * mt_rand(),0,'',''),0,5); $short = base_convert($short, 10, 36); $dpass = substr(number_format(time() * mt_rand(),0,'',''),0,10);