I'm trying to execute a simple shell command and print the result on a web page but the results are empty. Below is one bit of code I found but nothing has worked thus far.
<?php
$server = "myserver";
$username = "myadmin";
$command = "ps";
$str = "ssh " .$username. "@" .$server. " " .$command;
exec($str, $output);
echo '<pre>';
print_r($output);
echo '</pre>';
?>