re to: ds at NOSPAM dot undesigned dot org dot za
cool program! note when trying to exec() something:
in the while loop you need to reset exec() returns or you will get all results of all executions (on my my windows and or cygwin :-(
like:
<?php
echo "Enter something or 'exit' to quit\n";
do {
$cmdline = new prompt();
$buffer = $cmdline->get('shell command: ');
$data = null;
$return = null;
echo "You said: $buffer\n";
if (!empty($buffer)) {
$x = exec($buffer, $data, $return);
print_r($data);
}
} while ($buffer !== "exit");
echo "Goodbye\n";