0

Good morning. I own a PHP/MySQL chat application, where users can send messages (without refresh, using jQuery.AJAX) and receive the new ones. To make it "interactive" I use a JavaScript script which refreshes the messages div every second. I realized that this is not a brilliant system, because the amount of requests is huge and it doesn't work properly, it is too slow. Thus, I'm looking to migrate to Web Sockets, but it doesn't look like there is lots of PHP support for this technology. I'm wondering how, with a PHP/MySQL hosting, I could create Web Sockets. Any answer is welcome.

  • 1
    This is actually a huge question which I doute that there will be one answer that covers all what you need. So you wanna swtich from **polling** to **realtime updates**. I recommend integrating another service (**NodeJS** with **SockerIO**) and give the ability to interact with your **MySQL** db in parrallel to your **PHP backend** – medilies Feb 26 '22 at 14:24

0 Answers0