Guest User

Untitled

a guest
Apr 25th, 2018
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.96 KB | None | 0 0
  1. <?php
  2.      $HOST = "207.210.254.141"; //the ip of the bukkit server
  3.      $password = "walru51997";
  4.      $player = $_POST["fname"];
  5.      //Can't touch this:
  6.      $socket = fsockopen($HOST, "4445", $errno, $errstr, 2)
  7.      or die("error: could not create socket\n");
  8.      $succ = socket_connect($socket, $HOST, 4445)
  9.      or die("error: could not connect to host\n");
  10.      //Authentification
  11.      socket_write($sock, $command = md5($password)."<Password>", strlen($command) + 1)
  12.      or die("error: failed to write to socket\n");
  13.      //Begin custom code here.
  14.      socket_write($sock, $command = "/Command/ExecuteConsoleCommand:give $player 264 5;", strlen($command) + 1) //Writing text/command we want to send to the server
  15.      or die("error: failed to write to socket\n");
  16.      socket_write($sock, $command = "$player voted for MOOcraft and earned 5 diamonds. Vote at moocraft.org;", strlen($command) + 1)
  17.      or die("error: failed to write to socket\n");
  18.      ?>
Add Comment
Please, Sign In to add comment