PHP 亂數密碼產生器

Sample 1:
function randStr($len=6)
{
$chars=’ABDEFGHJKLMNPQRSTVWXYabdefghijkmnpqrstvwxy23456789#%*’;
// characters to build the password from
mt_srand((double)microtime()*1000000*getmypid());
// seed the random number generater (must be done)
$password=”;
while(strlen($password)<$len)
$password.=substr($chars,(mt_rand()%strlen($chars)),1);
return $password;
}

Sample 2:
function generatorPassword()
{
$password_len = 7;
$password = ”;

// remove o,0,1,l
$word = 7-zip與PowerISO的衝突 (2008-08-16)

  • twbbs暫停新域名申請服務 (2011-03-01)
  • Error: Failed to obtain HOSTUUID from XE CLI (2016-09-29)
  • 如果小資女孩沒有秦子齊和沈杏仁,我就看大仁哥 (2011-11-17)
  • CloudFlare 漏洞,有用的請改密碼 (2017-02-26)
  • 隨機美圖

    發佈留言

    發佈留言必須填寫的電子郵件地址不會公開。 必填欄位標示為 *