Message:

$token, 'msg' => $_POST['msg']); $response = getResponse($ip, $port, '/v2/server/broadcast/', $params); if($response['status'] == '200') print_success($response['response']); else print_failure($response['error']); } else print_failure("No Token Found!"); }?>
$token); $response = getResponse($ip, $port, '/v3/server/motd/', $params); if($response['status'] == '200') print_success('Message of the day:
'.$response['response']); else print_failure($response['error']); } else print_failure("No Token Found!"); } if($_GET['show'] == 'off') //Turn the server off. {?>

Message:

Confrim (Required to confirm that you want to turn the server off):

No save (Shutdown without saving):

$token, 'message' => $_POST['message'], 'confirm' => $confirm, 'nosave' => $nosave); $response = getResponse($ip, $port, '/v2/server/off/', $params); if($response['status'] == '200') print_success($response['response']); else print_failure($response['error']); } else print_failure("No Token Found!"); } } if($_GET['show'] == 'rawcmd') //Executes a remote command on the server, and returns the output of the command. { ?>

cmd:

$token, 'cmd' => $_POST['cmd']); $response = getResponse($ip, $port, '/v3/server/rawcmd/', $params); if($response['status'] == '200') { $response_table = "
";
						foreach ((array)$response['response'] as $line)
							$response_table .= $line."
"; $response_table .= "
"; echo $response_table; } else print_failure($response['error']); } else print_failure("No Token Found!"); } } if($_GET['show'] == 'reload') //Reload config files for the server. {?>

$token); $response = getResponse($ip, $port, '/v3/server/reload/', $params); if($response['status'] == '200') { print_success($response['response']); } else print_failure($response['error']); } else print_failure("No Token Found!"); } } if($_GET['show'] == 'restart') //Attempt to restart the server. {?>

Message:

Confrim (Required to confirm that you want to restart the server):

No save (Shutdown without saving):

$token, 'message' => $_POST['message'], 'confirm' => $confirm, 'nosave' => $nosave); $response = getResponse($ip, $port, '/v3/server/restart/', $params); if($response['status'] == '200') print_success($response['response']); else print_failure($response['error']); } else print_failure("No Token Found!"); } } if($_GET['show'] == 'rules') //Returns the rules, if they exist. { ?>

$token); $response = getResponse($ip, $port, '/v3/server/rules/', $params); if($response['status'] == '200') { $rules_div = "
"; echo $rules_div; } else print_failure($response['error']); } else print_failure("No Token Found!"); } } if($_GET['show'] == 'status') //The status endpoint returns basic information about the server's status. { ?>

Show Players:
Show Rules:

$token, 'players' => $players, 'rules' => $rules); $response = getResponse($ip, $port, '/v2/server/status/', $params); if($response['status'] == '200') { $status_table = ""; foreach ((array)$response as $key => $value) { if($key == "status") continue; if(is_array($value)) { $status_table .= ""; } else { $status_table .= ""; } } $status_table .= "
".$key.""; foreach ((array)$value as $v_key => $v_value) { if(is_array($v_value)) { $status_table .= ""; } else { $status_table .= ""; } } $status_table .= "
".$v_key.""; foreach ((array)$v_value as $v_subkey => $v_subvalue) { $status_table .= ""; } $status_table .= "
".$v_subkey."".$v_subvalue."
".$v_key."".$v_value."
".$key."".$value."
"; echo $status_table; } else print_failure($response['error']); } else print_failure("No Token Found!"); } } } }