Reputation: 105
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.
Upvotes: 0
Views: 302
Reputation: 1253
You can't use screen via shell_exec, as it is an interactive program and requires a TTY (input/output terminal).
Upvotes: 1