Advertisement
ibi

mkPasswd function

ibi
May 14th, 2014
2,607
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.47 KB | None | 0 0
  1. function mkPasswd() {
  2.     $consts='bcdgklmnprst';
  3.     $vowels='aeiou';
  4.     $numbers='0123456789';
  5.  
  6.     for ($x=0; $x < 6; $x++) {
  7.         mt_srand ((double) microtime() * 1000000);
  8.         $const[$x] = substr($consts,mt_rand(0,strlen($consts)-1),1);
  9.         $vow[$x] = substr($vowels,mt_rand(0,strlen($vowels)-1),1);
  10.         $num[$x] = substr($numbers,mt_rand(0,strlen($numbers)-1),1);
  11.     }
  12.     return $const[0] . $vow[0] .$const[2] . $num[1]. $const[1] . $vow[1] . $const[3] . $vow[3] . $const[4]. $num[0];
  13. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement