Advertisement
Guest User

Untitled

a guest
Sep 28th, 2017
105
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.07 KB | None | 0 0
  1. <?php
  2. $user = $_GET['user'];
  3. $pass = $_GET['pass'];
  4. $uid = $_GET['uid'];
  5.  
  6. if(!isset($uid)){
  7.  
  8. echo "Hello, welcome to INVIDE.<br>The invite project.<br>";
  9. echo "<form action=register.php method=get>";
  10. echo "Username: <input type=textbox name=user><br>";
  11. echo "Password: <input type=password name=pass><br>";
  12. echo "InviteID: <input type=textbox name=uid><br>";
  13. echo "<input type=submit value=Submit><br>";
  14. echo "</form>";
  15.  
  16. } else {
  17.  
  18. $file = fopen("serials.php", "r");
  19. $data = fread($file, filesize("serials.php"));
  20.  
  21. $pieces = explode("\n", $data);
  22. if(in_array($uid, $pieces)){
  23. echo "Welcome to INVID!<br?";
  24. echo "You entered the correct code, and are now registered on INVIDE.<br>";
  25. echo "You have two invites:<br>";
  26. $ran1 = rand(0,999)."-".rand(0,999)."-".rand(0,999);
  27. $ran2 = rand(0,999)."-".rand(0,999)."-".rand(0,999);
  28. echo $ran1."<br>";
  29. echo $ran2;
  30. $serials = fopen("serials.php", "a");
  31. //fwrite($serials, $data);
  32. fwrite($serials, $ran1."\n");
  33. fwrite($serials, $ran2."\n");
  34. fclose($serials);
  35. }
  36. fclose($file);
  37.  
  38.  
  39. }
  40. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement