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 = 在網路上買技嘉的主機板,GG了很麻煩 (2015-07-24)

  • Notion 測試 還不能滿足我日常使用的部份 (2021-03-23)
  • 被打敗的新聞 實在有夠鳥的 (2014-03-24)
  • 反人肉,從自己做起 (2012-03-20)
  • 光陰的故事~劇情Bug連連 (2009-02-13)
  • 隨機美圖

    發佈留言

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