Skip to content

Instantly share code, notes, and snippets.

@cbuchler
Created May 21, 2013 09:36
Show Gist options
  • Save cbuchler/5618620 to your computer and use it in GitHub Desktop.
Save cbuchler/5618620 to your computer and use it in GitHub Desktop.
<?php
function GenerateTan($TanLength){
$chars = array_merge(range('a','z'),range('A','Z'),range('0','9');
$tan = "";
for($i = 0; $i <= $TanLength; $i++){
$ran_num = rand(0, count($chars)-1);
$pwd .= $chars[$ran_num];
}
return $pwd;
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment