I have a game server running through the screen command and I was wondering whether there is a way to see the contents of the screen through a PHP webpage.
At the same time I also need a way to inject commands back into the screen console.
This is what I've tried so far:
$output = shell_exec('screen -r public');
echo "<pre>$output</pre>";
However this returns an errors saying
Must be connected to a terminal.