0

I currently have a PHP back-end and a jQuery front-end on my web application. The app constantly updates a stream of data on the front-end; right now it does this by continually polling a PHP script from jQuery's $.post() function. This is not efficient and causes delays in the data. I believe a socket (maybe Socket.io?) can solve this problem, but I don't know much about them. How can I setup a socket with PHP and my Javascript front-end? Where can I get more information about this? Where could I find an example?

Thank you,

--

Leopold Joy
  • 4,524
  • 4
  • 28
  • 37
  • See [here](http://stackoverflow.com/questions/12203443/is-native-php-support-for-web-sockets-available) – MattSizzle Jan 08 '16 at 17:41
  • Consider using server-sent events (SSE's). https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events – Mike Jan 08 '16 at 17:43

0 Answers0