Guest User

ExternalTimeSet

a guest
Apr 24th, 2012
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.85 KB | None | 0 0
  1. <?php
  2. $HOST = "87.104.72.100"; //the ip of the bukkit server
  3. $password = "00101000";
  4. //Can't touch this:
  5. $sock = socket_create(AF_INET, SOCK_STREAM, 0)
  6. or die("error: could not create socket\n");
  7. $succ = socket_connect($sock, $HOST, 4445)
  8. or die("error: could not connect to host\n");
  9. //Authentification
  10. socket_write($sock, $command = md5($password)."<Password>", strlen($command) + 1)
  11. or die("error: failed to write to socket\n");
  12. //Begin custom code here.
  13. socket_write($sock, $command = "/Command/ExecuteConsoleCommand:time day;", strlen($command) + 1) //Writing text/command we want to send to the server
  14. or die("error: failed to write to socket\n");
  15. socket_write($sock, $command = "Time set to day;", strlen($command) + 1)
  16. or die("error: failed to write to socket\n");
  17. ?>
Advertisement
Add Comment
Please, Sign In to add comment