Return to Snippet

Revision: 5561
at March 16, 2008 04:36 by iTony


Initial Code
function auth_pwgen(){
  $pw = '';
  $c  = 'bcdfghjklmnprstvwz'; //consonants except hard to speak ones
  $v  = 'aeiou';              //vowels
  $a  = $c.$v;                //both
 
  //use two syllables...
  for($i=0;$i < 2; $i++){
    $pw .= $c[rand(0, strlen($c)-1)];
    $pw .= $v[rand(0, strlen($v)-1)];
    $pw .= $a[rand(0, strlen($a)-1)];
  }
  //... and add a nice number
  $pw .= rand(10,99);
 
  return $pw;
}

Initial URL

                                

Initial Description

                                

Initial Title
Random pronounceable passwords generator

Initial Tags

                                

Initial Language
PHP