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 = 國泰世華支票出包燒到我~靠北邊走 (2011-03-10)

  • mysqldump –all-database 備份好用 一點小不便 3分鐘學會小功能 功力大增 (2021-09-01)
  • 背包客帶你玩轉北印度!新德里周邊7大超讚景點&2025空污交通大預測! (2025-12-25)
  • 減肥 逾百校推動長跑計畫 (2007-10-31)
  • 在原價展組裝世博通代理的先馬機殼發爐事件之我思 (2015-10-24)
  • 隨機美圖

    發佈留言

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