Welcome to Questionaries, where you can ask questions and receive answers from other members of the community.

Let us know at info@questionaries.org

Random Key Generator

8 like 0 dislike
Random Key Generator
asked 2 years ago by monirulislam (51,620 points)

1 Answer

0 like 0 dislike
 
Best answer
Ah so you have numeric keys..

I use random strings like:
php Code:

function GetKey($length) {
        $x=0;
        $char = "abcdefghijklmnopqrstuvxyz=#1234567890-_";
        $char_length = strlen($char);
        $str = "";
        while($x++ < $length) {
            $str .= $char{rand(0,$char_length-1)};
        }
        return $str;
    }
answered 2 years ago by monirulislam (51,620 points)

Related questions

0 like 0 dislike
0 answers
6 like 0 dislike
0 answers
asked 1 year ago by eagles11 (179,830 points)