<?php
include_once('mcmyadmin.class.php');
'username' => 'snip',
'password' => 'snip',
'host' => 'snip',
'port' => snip,
);
$mcmyadmin = new McMyAdmin($mcconfig['username'],$mcconfig['password'],$mcconfig['host'],$mcconfig['port']);
$players = $mcmyadmin->getPlayers();
if(isset($_GET['start'])) {
$mcmyadmin->startServer();
}
if(isset($_GET['stop'])) {
$mcmyadmin->stopServer();
}
if(isset($_GET['restart'])) {
$mcmyadmin->restartServer();
}
if(isset($_GET['kill'])) {
$mcmyadmin->killServer();
}
if(isset($_GET['30s-restart'])) {
$mcmyadmin->sendChat('The Server will be restarted in 30 seconds.');
}
if(isset($_GET['20s-restart'])) {
$mcmyadmin->sendChat('The Server will be restarted in 20 seconds.');
}
if(isset($_GET['10s-restart'])) {
$mcmyadmin->sendChat('The Server will be restarted in 10 seconds.');
}
if(isset($_GET['5s-restart'])) {
$mcmyadmin->sendChat('The Server will be restarted in 5 seconds.');
}
if(isset($_GET['30s-stop'])) {
$mcmyadmin->sendChat('The Server will be shut down in 30 seconds.');
}
if(isset($_GET['20s-stop'])) {
$mcmyadmin->sendChat('The Server will be shut down in 20 seconds.');
}
if(isset($_GET['10s-stop'])) {
$mcmyadmin->sendChat('The Server will be shut down in 10 seconds.');
}
if(isset($_GET['5s-stop'])) {
$mcmyadmin->sendChat('The Server will be shut down in 5 seconds.');
}
function print_list($array) {
$str = '<ul>';
foreach($array as $key => $value) {
$str .= '<li> ' . $key .': ';
$str .= print_list($value);
} else {
$str .= $value;
}
$str .= '</li>';
}
$str .= '</ul>';
return $str;
}
Replies to Untitled
Title |
Name |
When |
Re: Untitled |
Scribby Crocodile |
10 Years ago. |
{"html5":"htmlmixed","css":"css","javascript":"javascript","php":"php","python":"python","ruby":"ruby","lua":"text\/x-lua","bash":"text\/x-sh","go":"text\/x-go","c":"text\/x-csrc","cpp":"text\/x-c++src","diff":"diff","latex":"stex","sql":"mysql","xml":"xml","c_loadrunner":"text\/x-csrc","c_mac":"text\/x-csrc","coffeescript":"text\/x-coffeescript","csharp":"text\/x-csharp","ecmascript":"javascript","groovy":"text\/x-groovy","haskell":"text\/x-haskell","html4strict":"htmlmixed","java":"text\/x-java","java5":"text\/x-java","jquery":"javascript","mysql":"mysql","pascal":"text\/x-pascal","perl":"perl","perl6":"perl","plsql":"plsql","properties":"text\/x-properties","scheme":"text\/x-scheme","vb":"text\/vbscript","vbnet":"text\/vbscript","verilog":"text\/x-verilog","yaml":"text\/x-yaml"}