linux - How can i send command to screen using php? -
i'm using code send command via rcon game server, this library. this actual code: <?php require __dir__ . 'sourcequery/bootstrap.php'; use xpaw\sourcequery\sourcequery; define( 'sq_server_addr', 'my ip' ); define( 'sq_server_port', 27015 ); define( 'sq_timeout', 1 ); define( 'sq_engine', sourcequery::source ); $query = new sourcequery( ); try { $query->connect( sq_server_addr, sq_server_port, sq_timeout, sq_engine ); $query->setrconpassword( 'my pass' ); var_dump( $query->rcon( 'the command' ) ); { $query->disconnect( ); } ?> but example if want stop server can send command "quit" through rcon, how starting server? idea can send command once press button (the server on same machine website), piece of code not work: exec('screen -p 0 -s csgo -x eval \'stuff "./scds_run other para...