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,
--