예제 #1
0
function emailkey()
{
    $random_password = randpass();
    $random_number = rand();
    $datetime = date("w-Y.d.m:t-H::i::s");
    $str = $datetime . $random_password . $random_number;
    return md5($str);
}
function genpassword()
{
    echo "new password list...<br>\n";
    connect_db();
    //  $res = mysql_query("SELECT * FROM user_info WHERE NOT(type='A')");
    $res = mysql_query("SELECT * FROM user_info WHERE (type='C')");
    $row = mysql_num_rows($res);
    for ($i = 0; $i < $row; $i++) {
        echo mysql_result($res, $i, 'user_id') . ':';
        echo mysql_result($res, $i, 'name') . ':';
        $pass = randpass();
        echo $pass . "<br>\n";
        setpassword(mysql_result($res, $i, 'user_id'), $pass);
    }
    close_db();
}
예제 #3
0
 function randword()
 {
     global $cool;
     $func = "name" . mt_rand(0, 11);
     $func2 = "name" . mt_rand(0, 11);
     switch (mt_rand(0, 11)) {
         case 0:
             return $func() . mt_rand(5, 99);
         case 1:
             return $func() . "-" . $func2();
         case 2:
             return $func() . $cool[mt_rand(0, count($cool) - 1)];
         case 3:
             return $func() . "!" . $func();
         case 4:
             return randpass(mt_rand(5, 12));
         default:
             return $func();
     }
 }