Answer the question
In order to leave comments, you need to log in
How to send a keystroke to an executing script run via php via php?
The point is this. I run a console application and it runs until the Q key or ctrl+C is pressed. I use the shell_exec function to run the script. I need at some point to make it so that I would send a keystroke q or ctrl + c to the running process.
Answer the question
In order to leave comments, you need to log in
shell_exec("kill -9 $pid");
How to get pid:
stackoverflow.com/questions/1470910/invoke-externa...
stackoverflow.com/questions/7829005/php-get-the-li...
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question