Hi,
I have a PHP script running in CGI mode as a daemon. I'm writing another (non-daemon) PHP script that needs to be able to pass data to the daemon. How does one achieve this? Do I somehow set up the daemon to "listen" at a certain port or something? I definitely want to avoid writing to disk -- I need this to be fast; that's why I'm trying to do it all in-memory. Any info would be greatly appreciated.
Well, shared memory may be an option, but I wouldn't reecommend it.
I think the best thing to do would be to create a queue for the daemon that is populated by the non-daemon, of course causing disk writes.
Thanks, Tom.
I should have mentioned that the daemon and the client script are running on separate machines, so it wouldn't be shared memory.
I just tried writing a sample daemon that opens a socket and continuously echoes fgetc(). I then wrote a sample client script that opens the same socket and continuously fputs() a character. The daemon isn't echoing anything. Am I going about this all wrong?