Answer the question
In order to leave comments, you need to log in
I'm making a site in PHP, how can I make something like Lomg Polling or Socket so that it's just a library and not a whole server?
What is the essence of the project?
First, I do it purely for myself.
Secondly, I am doing something like a service for publishing posts, including anonymous ones, essentially similar to Twitter but without such wide functionality. It will contain a ribbon, respectively, which should be updated by itself.
My options
are using Socket.io. I’m not very good with it, but as I understand it, it will be difficult to attach it to the site here, because it will be necessary to bathe with NodeJS.
- using a socket in PHP. I looked for something similar, but there is little description of how to work with this, etc. I think it's not.
What do I use?
open server. The site is written in PHP, JS, HTML (tpl, Smarty ), CSS ( Bootstrap ).
If this cannot be implemented on such modules and languages, then ReactJS can still be used, because. have some experience? But is it possible to deploy such a site on ReactJS, taking into account Smarty and Bootstrap (unless, of course, there are other similar frameworks, but for pure JS, i.e. ReactJS?
If there are other options, without crutches, etc., then please suggest. Maybe I'm not catching up with something, so the tips will also come in handy.
Answer the question
In order to leave comments, you need to log in
Try https://github.com/centrifugal/centrifugo
Send new posts to the channel with php, subscribe to the channel with js and display them in the feed
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question