A simple random password generation function which generates various length (up to 32 characters) of password with numerals and alphabets.
Code:
<?php
function genPass($length = 8) //max length = 32 characters
{
return substr(md5(uniqid(rand(), true)), 0, $length);
}
?>
No comments:
Post a Comment