Re: Communicate with daemon.
I'll answer my own question.
On my linux application, I can use the mkfifo() command that will create a pipe.
PHP can read/write to this pipe just as if it was a file.
My linux application creates a new thread that has a while(true) block that runs a blocking function to read the pipe.
So... the 'infinite' loop thread will just sit there until data is written to that pipe, and then it can respond back.
Looking down the road a bit...
I will eventually create a website that will use AJAX methods to continuously poll for data from my daemon using the same php/pipe method.