I have a PHP TCP daemon which provides data to clients. One of the features is to get info from "tail -f messages" command. So I have to run this command asynchronously and in case of new data, send it to the clients.
I have a problem how to create this asynchronous reader - when new data is added, run the method, otherwise do the other things you have to.
Mejmo
EDIT: My problem could be resolved by using some kinds of threads and IPC (does php support threads?).
If you can install extensions, you can implement this using the libevent PHP extension.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With