//die('die on line 12of index.php'); if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') { die('Terminal is not supported on this system'); } set_time_limit(0); error_reporting(E_ALL); /** * The includes. */ include "test_webterminal/process.class.php"; include "test_webterminal/terminal.class.php"; /** * The command comes from ajax-post. */ if (isset($_POST['stdin'])) { Terminal::postCommand($_POST['stdin']); exit; } /** * The authentication. * You can change this method. * I've used Auth Basic as example. */ /* if (!isset($_SERVER['PHP_AUTH_USER']) || !Terminal::autenticate('root','kenakena23')) { header('WWW-Authenticate: Basic realm="xwiterm (use your linux login)"'); header('HTTP/1.0 401 Unauthorized'); echo "Authentication failure :)"; exit; }