Generate A Password

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Generate A Password

    Code:
    /**
     * Generate a password containing letters and numbers.
     *
     * @param int $length
     * @param bool[optional] $mixed_case
     *
     * @return string
     */
    function gen_pass($length, $mixed_case=true) {
        $password = '';
        for($i=0;$i<$length;$i++){
            $letter = base_convert(rand(0,35),10,36);
            $password .= ($mixed_case && rand(0,1)) ? strtoupper($letter) : $letter;
        }
        return $password;
    }

    #2
    lol how about when i lost my password and i want it by email?
    www.inbuzunar.mobi - Your mobile portal pocket

    Comment


      #3
      lol how about when i lost my password and i want it by email?[/b]
      For a lava script?..

      ive seen the coding for that on another site, ill get and post it because its a diff one because the passwords are md5 so it will need to have a md5 encurpter (or whatever its called) with it

      Comment


        #4
        Nope, you need send/show random generated password to user, before you md5 it! Coz md5 is all most imposable to decrypt ....

        Comment

        Working...
        X