Guest User

http://www.reddit.com/r/dailyprogrammer/comments/pm6oj/21220

a guest
Feb 13th, 2012
159
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.45 KB | None | 0 0
  1. <html><head><title>PassGen</title></head><body>
  2. <form action="#" method="post">
  3. <input type="text" name="Passwords" value="# of Passes"/>
  4. <input type="text" name="Chars" value="# of Chars"/>
  5. <input type="submit">
  6. <?php
  7. if(isset($_POST['Passwords']))
  8.     for($i=0;$i<$_POST['Passwords'];$i++){
  9.         echo "Passord $i: ";
  10.         for($j=0;$j<$_POST['Chars'];$j++){
  11.             echo htmlentities(chr(mt_rand(33,125)));
  12.         }
  13.     echo "<br>";
  14.     }
  15. ?>
  16. </form></body></html>
Add Comment
Please, Sign In to add comment