0

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.

1 Answer 1

1

You can't use screen via shell_exec, as it is an interactive program and requires a TTY (input/output terminal).

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.