albin900

PHP HTTPTOOLS TUTORIAL

Feb 24th, 2014
123
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.60 KB | None | 0 0
  1. <?php
  2. // URL: http://dev.bukkit.org/bukkit-plugins/httptools
  3. $code = "123";
  4.  
  5. if($_GET["code"] == $code){}else{
  6.     exit("Auth failed");
  7. }
  8.  
  9. $p = $_GET["player"];
  10. $score = $_GET["score"];
  11.  
  12. $db = "mc_db.php";
  13.  
  14. if(file_exists($db)){
  15.     $contents = file_get_contents($db);
  16.     include($db);
  17. }else{
  18.     $contents = "<?php
  19. ";
  20. }
  21.  
  22. $i = 0;
  23.  
  24. if($data == null){
  25.  
  26. }else{
  27.  
  28.     for($i=0;$i<1000;$i++){
  29.         if($player[$i] == null || $player[$i] == $p) {
  30.             break;
  31.         }
  32.     }
  33. }
  34.  
  35.  
  36.  
  37. $new = $contents . '
  38. $data['.$p.'] = "'. $score .'";
  39. $player['.$i.'] = "'.$p.'";
  40. ';
  41.  
  42.  
  43. $f = fopen($db,"w+");
  44. fwrite($f,$new);
  45. ?>
Advertisement
Add Comment
Please, Sign In to add comment