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 = 把Vibo A688 刷機變成磚頭~一個字爽 (2011-08-05)

  • 我所認為的民主 (2009-12-10)
  • phpESP 第二套問卷系統測試 (2017-01-05)
  • qBittorrent Enhanced Edition 取代傳統 qBittorrent-nox (2025-10-01)
  • 豬哥會社-收視率持續下降 (2009-08-09)
  • 隨機美圖

    發佈留言

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