Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /* RAndom Pass Generator by bl4ck-dz*/
- echo "
- <html>
- <head><title>Random Pass Generator</title></head>
- <style>
- body {
- background-color:#ededed;
- display:block;
- text-align:center;
- font-family:'Tangerine', serif;
- font-size:19px;
- }
- #rand {
- border:1px solid #61555F;
- padding:5px;
- margin:20px;
- border-radius:10px;
- }
- #sub {
- border:1px dashed #8907AA;
- font-size:19px;
- padding:2px;
- margin:5px;
- border:radius:10px;
- cursor:pointer;
- }
- #sub:active{
- background:#5E6966;
- color:yellow;
- }
- </style>
- <body>
- <form method='post' action='' id='form'>
- lenght of password :<br>
- <input name='rand' type='text' id='rand'><br>
- <input name='submit' type='submit' value='generate' id='sub'>
- </form>";
- class randgen{
- private $alpha = "aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ0123456789";
- public function __construct () {
- if ($_POST['submit']) {
- echo "The Password : ". $this->random($dz);
- }
- }
- public function random ($dz){
- for ($i =1 ;$i<=$dz;$i++) {
- $randgen = $this->alpha[rand (0,strlen($this->alpha))];
- echo $randgen;
- }
- }
- }
- $pass = new randgen();
- $pass->random($_POST['rand']);
- echo "</body></html>";
- ?>
Add Comment
Please, Sign In to add comment