Answer the question
In order to leave comments, you need to log in
How to make user notifications with php (crown task) in socket.io?
Tasks are executed in the cron - once a minute, we want that when some actions occur in the cron, a real-time notification is sent (if the user is still on the site)
There is node.js + socket.io on the server - we have the identifier of a specific connected user.
There is no problem with the sockets themselves, but we can’t figure out how to send a notification from php.
One of the options is to send a request to the node via http ( example.com:1234/notiffication=USERID) so that it, in turn, already sends an emit to a specific user, but something tells me that this option is not entirely correct ..
Answer the question
In order to leave comments, you need to log in
Redis is used to communicate between php and nodes. We write to the radish what needs to be sent, the node listens to the radish and sends what it finds. Google solutions.
If you understand the problem correctly, you can try this
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question