すくすくゴートうちゃんのサーヴァ(黒歴史)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

23 lines
569 B

  1. <?php
  2. require_once './db_connection.php';
  3. require_once './modules/user.mod.php';
  4. $chars = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ!"#$%&()*+-./:;<=>?@[]^_`~';
  5. $user = new User;
  6. $user -> name = $_GET['name'];
  7. $user -> pass = implode (
  8. array_map (fn () => $chars[rand (0, strlen ($chars) - 1)], range (1, 8)));
  9. $user -> inheritance_code = implode (array_map (fn () => rand (0, 9), range (1, 12)));
  10. $user -> insert ();
  11. echo implode (',', [$user -> id,
  12. $user -> pass,
  13. $user -> inheritance_code]);