tempting to make multiple PHP scripts. One will start a program, another will send arguments to the program, and the third will get the current output of the program. This is an ongoing program so I cannot just have one page, as it would be loading forever waiting for the program to complete. How would I start a program (it is a shell using the command: sh run.sh) on one page and continue to access the same session of the program on other pages? to clarify, I am running a server that takes arguments at the command line. by session I mean the same instance of the program.
For example, I visit "start.php", and it runs the command "sh run.sh" from in the /server directory on the server computer. Then I visit "command.php", enter my command, and it submits it to "cmd.php?command=command", which emits the command followed by enter to the running process of run.sh.