My PHP web app receives data from a stream. Once the page is loaded I need to open an .exe file using system() or exec() and after short period of time new data will come, so I must type specific command to this .exe to get its returned value, how can I do this?
I’m only able to do this manually in command prompt
path/to/.exe :: hit 'Enter'
command1 params1
//...
What you’re looking for is
proc_open(). http://php.net/manual/en/function.proc-open.phpThis will allow you to work with STDIO streams to communicate with the separate process.
Example from the PHP documentation: