| Share this post! | Vote this! |
|
Here is the code which you can use to generate random and secure password in PHP.
<?
function generate_password($length='')
{
$str='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ-_?/:
(){}[]0123456789';
$max=strlen($str);
$length=@round($length);
if(empty($length)){$length=rand(8,12);}
$password=''; more...




0 comments:
Post a Comment