Advertisement
MorpheusArch

Human Readable String

Nov 13th, 2015
167
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.44 KB | None | 0 0
  1. <?php
  2. function readable_random_string($length = 6){  
  3.     $conso=array("b","c","d","f","g","h","j","k","l",  
  4.     "m","n","p","r","s","t","v","w","x","y","z");  
  5.     $vocal=array("a","e","i","o","u");  
  6.     $password="";  
  7.     srand ((double)microtime()*1000000);  
  8.     $max = $length/2;  
  9.     for($i=1; $i<=$max; $i++)  
  10.     {  
  11.     $password.=$conso[rand(0,19)];  
  12.     $password.=$vocal[rand(0,4)];  
  13.     }  
  14.     return $password;  
  15. }
  16. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement