PHP Code:
<?php
// Executes system commands
// and displays output
function docommand($command) {
$out = "=============\nOutput\n=============\n\n";
if (!($p=popen("($command)2>&1","r"))) {
return 126;
}
while (!feof($p)) {
$line=fgets($p,1000);
$out .= $line;
$out .= "<br>";
}
pclose($p);
return $out;
}
$command1= "netstat -s 131.238.x.x";
$command = "yourproggie.exe -ip ";
$command .= docommand($command1);
// adds the IP to the end of the command
$realcommand = docommand($command);
// This command executes whatever
// is inside $command, and then
// displays ALL of the output of that
// specific command
// for your app just make
// $command = "yourapp.exe -parameters";
// Mitchell Dempsey
// webdestroya at cox dot net
?>
As for CTRL^C and whatnot, im not really sure what you would do, but this command doesnt leave programs running, it displays output after the program has closed, so if you have an infinite loop, you will never see output, infact, the page will never stop loading. you would have to make some sort of service
and use start and stop commands, and make a graphical web
interface to send the service commands