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 = 不到九個月PQI隨身碟再度掛掉2隻 (2014-11-10)

  • 名詞解釋:虛擬量測 (2011-01-20)
  • 威寶、中華、PHS、亞太信號評測 (2008-11-28)
  • GPhone PK iPhone誰將取勝 (2007-11-06)
  • 紅米機台灣版從 MIUI JHBTWAH2.0(V5/4.2)升到MIUI JHBTWAL5.0(V5/4.2.2)不升也罷 (2014-01-13)
  • 隨機美圖

    發佈留言

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