PHP

Generate Random Password

Simple Password Generator

function generatePass($size) {
    $chars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789!@#$%()_-*+";
    $passwd = "";
    for($i=0;$i<$size;$i++) {
        $passwd .= $chars[rand(0, 72)];
    }
    return $passwd;
}

Example

echo generatePass(8).'<br>';
echo generatePass(10).'<br>';
echo generatePass(12).'<br>';