Temporary password in PHP
Copy this code and paste it in your HTML
function randompassword($len)
{
$pass = '';
$lchar = 0;
$char = 0;
for($i = 0; $i < $len; $i++)
{
while($char == $lchar)
{
if($char > 57) $char += 7;
if($char > 90) $char += 6;
}
$lchar = $char;
}
return $pass;
}
URL: http://www.go4expert.com/forums/showthread.php?t=269
Report this snippet
Comments
Subscribe to comments