Posted By

Chrischo on 09/11/16


Tagged

readable password generate


Versions (?)

Generate Readable Password


 / Published in: PHP
 

Usage in PHP:

$newpass = generateEasyPassword ();

Results in something like:

ginution86 vibesion53 xakamum53 fevition75 hewibing24 xesumum2 sinundle60 likment1 wabton83 gosumum73 rudubing99 hufubing57 motomum59 tawandle37 nezmum8 zetafing19 mututon77 yapition4 jugision39 lodeding59 latuser34 yiganat16 momaton54 hokafing94 noftion75

  1. function generateEasyPassword () {
  2. $arr1 = array("ba","be","bi","bo","bu","ca","ce","ci","co","cu","da","de","di","do","du","fa","fe","fi","fo","fu","ga","ge","gi","go","gu","ha","he","hi","ho","hu","ja","je","ji","jo","ju","ka","ke","ki","ko","ku","la","le","li","lo","lu","ma","me","mi","mo","mu","na","ne","ni","no","nu","pa","pe","pi","po","pu","ra","re","ri","ro","ru","sa","se","si","so","su","ta","te","ti","to","tu","va","ve","vi","vo","vu","wa","we","wi","wo","wu","xa","xe","xi","xo","xu","ya","ye","yi","yo","yu","za","ze","zi","zo","zu");
  3. $arr2 = array("b","d","f","g","k","l","m","n","p","r","s","t","v","w","z");
  4. $arr3 = array("a","e","i","o","u");
  5. $arr4 = array("ment","tion","sion","son","ton","bing","ding","fing","ser","lle","ndle","mat","nat","mum");
  6. $pw = $arr1[rand(0,count($arr1))].$arr2[rand(0,count($arr2))].$arr3[rand(0,count($arr3))].$arr4[rand(0,count($arr4))].rand(1,100);
  7. return $pw;
  8. }

Report this snippet  

You need to login to post a comment.