Skip to content

Instantly share code, notes, and snippets.

@JohnstonCode
Created May 16, 2020 13:36
Show Gist options
  • Save JohnstonCode/0d23242119b72228d017c16a9e1dab6b to your computer and use it in GitHub Desktop.
Save JohnstonCode/0d23242119b72228d017c16a9e1dab6b to your computer and use it in GitHub Desktop.
<?php
if (isset($_POST['action'])) {
switch ($_POST['action']) {
case 'stop':
exec('ls');
break;
case 'start':
exec('ls');
break;
case 'restart':
exec('ls');
break;
case 'force_stop':
exec('ls');
break;
}
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Minecraft Admin</title>
</head>
<body>
<h1>Minecraft Admin</h1>
<form action="" method="post">
<button type="submit" name="action" value="start">Start</button>
<button type="submit" name="action" value="stop">Stop</button>
<button type="submit" name="action" value="restart">Restart</button>
<button type="submit" name="action" value="force_stop">Force Stop</button>
</form>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment