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 = OLPC-尼葛洛龐蒂:OLPC不排斥Windows (2007-11-03)

  • 相差28歲師生戀修成正果 新郎比岳父還大2歲 (2007-11-24)
  • ASUS Eee PC正式在港發售 首批500部10分鐘內全部售罄 (2007-11-03)
  • 找到happyboti開心農場免費外掛的替代品 (2010-12-05)
  • 我眼中的HTC 看HTC One S台版降規事件 (2012-06-07)
  • 隨機美圖

    發佈留言

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