Very simple password generator

GZ - Password Generator


<?php
function randpass() {
$chars = "abcdefghijklmnopqrstuvwxyz0123456789";
// u can include, change or exclude some characters from here
srand((double)microtime()*1000000);
$i = 0;
$pass = '' ;

while ($i != 8) { // number of character in new password
$num = rand() % 33;
$tmp = substr($chars, $num, 1);
$pass = $pass . $tmp;
$i++;
}
return $pass;
}
//
$password = randpass();
echo "New generated password is: $password";
// display new password
?>

demo comments (0)

User Comments (0)

( ADD YOURS ) ( GET GRAVATAR )
  1. 31.12.1969

    ( Reply )

Notice: Undefined index: gotovo in /home/content/g/u/t/gutovic/html/full.php on line 249

 

« Older posts