PHP application + WebSocket based notifications over Socket.IO

后端 未结 3 1494
无人及你
无人及你 2020-12-23 15:19

I have a web application written in PHP using laravel.

Now, I have to add realtime notification system that pushes messages from server -> client, and can retrieve

3条回答
  •  情话喂你
    2020-12-23 15:51

    There isn't an easy way to communicate between node and apache/php. So you're either going to have to write all of your functionality again in node (connecting to mysql databases and such) or create an API to call from Node and pass to sockets.

    However you could use a jquery plugin like Jquery graceful websockets and this php class to get your own websockets functionality with jquery and php, rather than using sockets.io.

提交回复
热议问题