How to create this unique KEY post is finally edited by satans18 at 2013-04-02:33:14 jsfiddle. for every new record added by netmonte sluvckdf, an algorithm like "vcKdF" is created to calculate this KEY. thank you! ------ Solution-how to create this unique KEY
This post was last edited by satans18 at 19:33:14
Http://jsfiddle.net/monteslu/vcKdF/
Each time a record is added, a KEY similar to "vcKdF" is created.
Algorithm for finding this KEY
Thank you!
------ Solution --------------------
52. take 5 combinations (2598960 types, enough ).
------ Solution --------------------
Function getRandStr ($ len ){
$ Chars = array ("0", "1", "2", "3", "4", "5", "6", "7 ", "8", "9"); // replace with a-z, 52 types of A-Z
$ CharsLen = count ($ chars)-1;
Shuffle ($ chars );
$ Output = "";
For ($ I = 0; $ I <$ len; $ I ++ ){
$ Output. = $ chars [mt_rand (0, $ charsLen)];
}
Return $ output;
}
?>