BobbyeM71hxwHow to generate readable/remeberable random password?

<?php
$randPwd = generatePassword(12);
?>

Fast, simple, and easy way to generate readable/remeberable random password

<?php
//Generates readable/rememberable random password.
function generatePassword($length = 6) {
$chars = array(“a”, “b”, “c”, “d”, “e”, “f”, “g”, “h”, “i”, “j”, “k”, “l”, “m”, “o”, “p”, “r”, “s”, “t”, “u”, “v”, “x”,”y”, “z”);
$vocals = array(“a”, “e”, “i”, “o”, “u”);
$password = “”;
mt_srand ((double) microtime() * 1000000);
for ($i = 1; $i <= $length; $i++)
$password .= ($i % 2 == 0)?$chars[mt_rand(0, count($chars) – 1)]:$vocals[mt_rand(0,count($vocals) – 1)];
return $password;
}
?>
<?php

//Generates readable/rememberable random password.
function generatePassword($length = 6) {
       $chars = 
        array("a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "o", "p", "r", "s", "t", "u", "v", "x","y", "z");
       $vocals = array("a", "e", "i", "o", "u");
       $password = "";
       mt_srand ((double) microtime() * 1000000);
       for ($i = 1; $i <= $length; $i++)
           $password .= ($i % 2 == 0)?$chars[mt_rand(0, count($chars) - 1)]:$vocals[mt_rand(0,count($vocals) - 1)];
return $password;
}
?>

http://get-a-designer.com

http://www.all1sourcetech.com

Tags: , , ,