Created
March 4, 2011 20:11
-
-
Save gavinblair/855627 to your computer and use it in GitHub Desktop.
Minecraft Server Message command
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
unset($argv[0]); | |
$message = implode(" ", $argv); | |
shell_exec("curl -d '{\"name\":\"SERVER\",\"message\":\"$message\"}' http://10.0.1.104:80/up/sendmessage"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
php msg.php $* |
Why are you using the command line rather than php's curl?
Way easier, especially since I am not expecting anything back from the server. Takes a minimum of 3 lines of code to do PHP's cURL.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
They can't speak back to me though...