Posted By

iTony on 03/16/08


Tagged

random generator passwords


Versions (?)

Who likes this?

12 people have marked this snippet as a favorite

luman
Nix
wizard04
jprice
jfherring
ignace
Premier13
adth
rave
rmethod
ringo380
Some0ne


Random pronounceable passwords generator


 / Published in: PHP
 

  1. function auth_pwgen(){
  2. $pw = '';
  3. $c = 'bcdfghjklmnprstvwz'; //consonants except hard to speak ones
  4. $v = 'aeiou'; //vowels
  5. $a = $c.$v; //both
  6.  
  7. //use two syllables...
  8. for($i=0;$i < 2; $i++){
  9. $pw .= $c[rand(0, strlen($c)-1)];
  10. $pw .= $v[rand(0, strlen($v)-1)];
  11. $pw .= $a[rand(0, strlen($a)-1)];
  12. }
  13. //... and add a nice number
  14. $pw .= rand(10,99);
  15.  
  16. return $pw;
  17. }

Report this snippet  

Comments

RSS Icon Subscribe to comments
Posted By: withremote on July 9, 2008

I dig it, I'll have to try and remember to use this!

I built a little page for this: http://www.natenolting.com/passgen/passgen.php http://www.natenolting.com/passgen/passgen.txt

Posted By: withremote on July 9, 2008

I dig it, I'll have to try and remember to use this!

I built a little page for this: http://www.natenolting.com/passgen/passgen.php http://www.natenolting.com/passgen/passgen.txt

Posted By: wizard04 on August 4, 2008

Cool!

You need to login to post a comment.