Login Register






PHP Password Generator filter_list
Author
Message
PHP Password Generator #2
Hi! Made this little script as a practice.
Code:
<?php function rand_password($len) { mt_srand((double)microtime()*1000000^getmypid()); $password=''; $chars='ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-+@#?~'; // Used characters while(strlen($password)<$len) $password.=substr($chars,(mt_rand()%strlen($chars)),1); return $password; } $password=rand_password($num); ?> <html> <body> <title> Password Generator </title> <form method="GET" action="pass.php"> How long password you want:<input type="text" size="60" name="num">&nbsp;&nbsp; <input type="submit" value="[ ok ]"><br> </form> <?php echo "Generated password: <b>$password</b>"; ?>


Reply





Messages In This Thread
PHP Password Generator - by Slarek - 08-24-2013, 06:38 PM
PHP Password Generator - by Slarek - 08-24-2013, 06:38 PM