Advertisement
MichaelLite

Práctica elaborada por tí / Generador de contraseñas

Mar 14th, 2022
1,096
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.72 KB | None | 0 0
  1. <?php
  2.   $charset = "abcdefghijklmnopqrstuvwxyx123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ";
  3. $cad = "";
  4.   for($i=0;$i<10;$i++) {
  5.     $cad .= substr ($charset, rand (0, 61), 1);
  6.  
  7. }
  8.  
  9.  
  10. ?>
  11.  
  12. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"   "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  13. <html xmlns="http://www.w3.org/1999/xhtml">
  14. <head>
  15. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  16. <title>Generador de Contraseñas</title>
  17. </head>
  18.  
  19. <body>
  20. <style type="text/css">
  21. #caja{
  22.     background:#B9DCFF;
  23.     width:270px;
  24.     height:220px;
  25.     border:2px dotted black;
  26.     margin:10px auto;
  27.     padding:1em;
  28.     border-radius:18px
  29. }
  30. h1,h2,h3,h4{
  31.     font-family:arial;
  32.     color:#ffffff;
  33. }
  34. input[type=text],input[type=password]{
  35.     margin:0 0 1em 0;
  36.     width:200px;
  37.     border:0px;
  38.     padding:1em;
  39.     border-radius:3px;
  40. }
  41. input[type=submit], form a{
  42.     padding:1em;
  43.     background:#FC6;
  44.     border:none;
  45.     color:black;
  46.     font-family:arial black;
  47.     font-size:10px;
  48.     border-radius:3px;
  49.     text-decoration:none;
  50.    
  51. }
  52. h1,h2,h3,h4{
  53.     font-family:arial;
  54.     color:#FFF;
  55. }
  56. h8{
  57.     font-family
  58.     color:#000;
  59.    
  60.    
  61.    
  62. }
  63.  
  64.  
  65. <body>
  66.    
  67. }
  68. </style>
  69. <div id="caja">
  70.   <div align="center">
  71.     <form id="form1" name="form1" method="post" action="">
  72.       <p><img src="https://cdn-icons.flaticon.com/png/512/5359/premium/5359937.png?token=exp=1647269042~hmac=3226305015904dceb0ba7c71c30cda5f" alt="" width="75" height="75" /></p>
  73.       <p>
  74.         <label for="user"></label>
  75.       </p>
  76.       <p>
  77.         <input type="text" name="code" value="<?php echo $cad;?>" />
  78.       </p>
  79.       <p>
  80.         <input type="submit" name="button" id="button" value="Guardar" />
  81.       </p>
  82.     </form>
  83.     <p>&nbsp;</p>
  84.   </div>
  85. </div>
  86. </body>
  87. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement