Jump to content

Random 6char keygen


Demonic

Recommended Posts

anyone know how to make one i know randnumbers not characters.Characters only.
nvm
[code]
<?php

$length    = 7;
$key_chars = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789';
$rand_max  = strlen($key_chars) - 1;

for ($i = 0; $i < $length; $i++)
{
  $rand_pos  = rand(0, $rand_max);
  $rand_key[] = $key_chars{$rand_pos};
}

$rand_pass = implode('', $rand_key);

echo $rand_pass;

?>
[/code]
Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.