This script will generate random paswords (a given number, with a length you can decide).
Note that if you're running a PHP version < 4.2.0 you'll need srand() to seed the random number generator.
<?php
$availableChars = array(range("A", "Z"), range("a", "z"), $digits = range(0, 9));
$nrOfPwds = 3;
$nrOfChars = 5;
$pwd = array();
for ($i = 0; $i < $nrOfPwds; $i++) {
for ($j = 0; $j < $nrOfChars; $j++) {
if ($j == 0) {
$pwd[$i] = "";
}
$index1 = rand(0, 2);
$index2 = ($index1 < 2) ? rand(0, 25) : rand(0, 9);
$pwd[$i] .= $availableChars[$index1][$index2];
}
print $pwd[$i] . "<br>";
}
?>