Ten Friendly Random Generated Passwords:
With random lenghts of letters and digits. Just hit the refresh button to see some new ones.
idapa016
ukihu
ekesoca64
voheqot80
buloh179
fipodaqa
mizerufa
oqugi23
ebikavu2735
dojoxutu1930
<?php
function Mnemonic($letters = 6, $digits = 2)
{
$charset = array
(
0 => array('b', 'c', 'd', 'f', 'g', 'h', 'j', 'k', 'l', 'm', 'n', 'p', 'q', 'r', 's', 't', 'v', 'w', 'x', 'y', 'z'),
1 => array('a', 'e', 'i', 'o', 'u')
);
$result = null;
$charset_start = mt_rand(0, 1);
for ($i = 0 + $charset_start; $i < $letters + $charset_start; $i++)
{
$result .= $charset[$i % 2][array_rand($charset[$i % 2])];
}
$dirty_words = array('bix', 'bob', 'con', 'cum', 'fod', 'fuc', 'fud', 'fuk', 'gal', 'gat', 'gay', 'mal', 'mam', 'mar', 'mec', 'pat', 'peg', 'per', 'pic', 'pil', 'pit', 'put', 'rab', 'sex', 'tar', 'tes', 'tet', 'tol', 'vac', 'xup');
foreach ($dirty_words as $dirty_word)
{
if (strpos($result, $dirty_word) !== false)
{
return Mnemonic($letters, $digits);
}
}
if ($digits > 0)
{
for ($i = 0; $i < $digits; $i++)
{
$result .= mt_rand(0, 9);
}
}
else if ($digits < 0)
{
$digits = abs($digits);
for ($i = 0; $i < $digits; $i++)
{
$result = mt_rand(0, 9) . $result;
}
}
return $result;
}
echo "<h2>Ten Friendly Random Generated Passwords:</h2>\n";
echo "<h5>With random lenghts of letters and digits. Just hit the refresh button to see some new ones.</h5>\n";
for ($i = 0; $i < 10; $i++)
{
$letters = mt_rand(4, 8);
$digits = mt_rand(0, 4);
$prepend_digits = mt_rand(1, 5);
if ($prepend_digits == 1)
{
$digits = '-' . $digits;
}
echo Mnemonic($letters, $digits) . "<br />\n";
}
echo "<hr />";
highlight_file(__FILE__);
?>