ibi icon

mkPasswd function

ibi | PRO | 05/14/14 01:09:29 PM UTC | 0 ⭐ | 2968 👁️ | Never ⏰ | []
PHP |

470 B

|

None

|

0 👍

/

0 👎

function mkPasswd() {
    $consts='bcdgklmnprst';
    $vowels='aeiou';
    $numbers='0123456789';
 
    for ($x=0; $x < 6; $x++) {
        mt_srand ((double) microtime() * 1000000);
        $const[$x] = substr($consts,mt_rand(0,strlen($consts)-1),1);
        $vow[$x] = substr($vowels,mt_rand(0,strlen($vowels)-1),1);
        $num[$x] = substr($numbers,mt_rand(0,strlen($numbers)-1),1);
    }
    return $const[0] . $vow[0] .$const[2] . $num[1]. $const[1] . $vow[1] . $const[3] . $vow[3] . $const[4]. $num[0];
}

Comments