I don't want to login manually to SSH each time I want to start a PHP websocket server, so I am looking for a way to do it automatically after 1 click on a HTML button (using AJAX).
The AJAX calls a PHP file which should execute this command
php /public_html/myServer/server.php
to start the websocket server.
I know I can execute SSH commands with PHP's shell_exec
function like posted here, but this is not async because the AJAX call won't continue/finish until the websocket closes.
So in short does somebody knows a nice and async way to execute the earlier mentioned SSH command trough PHP, preferably without any additional extension or library?
ps: The websocket server should still be running on the hosting server when I close my internet browser, the only way to stop the server is to press a other HTML button which send the stop command trough SSH.