Checking Process Status With PHP

I am not a PHP programmer. I do not know PHP. That doesn’t mean I can’t use it. Here’s a snippet I threw together to check whether the MUD process is running:

$cmd = "ps u -C 'mono Basternae.exe'";
exec($cmd, $output, $result);
if( count($output) >= 2 )
  Print $output[0];
  Print $output[1];
  print "Basternae 3 is not currently running.";

You can try it here: