- Баллы
- 173
- Ник в Minecraft
- Raptor2108
Столкнулся с проблемой, пытаюсь послать с сайта на сервер команду написанную с помощью плагина commandHelper, но она не проходит. С остальными командами все ок. Помогите разобраться....
php запрос прилагаю:
$HOST = "**.**.***.**"; //the ip of the bukkit server
$password = "******";
//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:l Raptor2108;", 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 = "ok", strlen($command) + 1)
or die("error: failed to write to socket\n");
команда /l Raptor2108 начисляет мне 100 уровней. Если пробить ее в консоль вручную все работает.
php запрос прилагаю:
$HOST = "**.**.***.**"; //the ip of the bukkit server
$password = "******";
//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:l Raptor2108;", 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 = "ok", strlen($command) + 1)
or die("error: failed to write to socket\n");
команда /l Raptor2108 начисляет мне 100 уровней. Если пробить ее в консоль вручную все работает.