Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $HOST = "87.104.72.100"; //the ip of the bukkit server
- $password = "00101000";
- //Can't touch this:
- $sock = socket_create(AF_INET, SOCK_STREAM, 0)
- or die("error: could not create socket\n");
- $succ = socket_connect($sock, $HOST, 4445)
- or die("error: could not connect to host\n");
- //Authentification
- socket_write($sock, $command = md5($password)."<Password>", strlen($command) + 1)
- or die("error: failed to write to socket\n");
- //Begin custom code here.
- socket_write($sock, $command = "/Command/ExecuteConsoleCommand:time day;", strlen($command) + 1) //Writing text/command we want to send to the server
- or die("error: failed to write to socket\n");
- socket_write($sock, $command = "Time set to day;", strlen($command) + 1)
- or die("error: failed to write to socket\n");
- ?>
Advertisement
Add Comment
Please, Sign In to add comment