Trying to write a gaming web <> Server chat in PHP. From the server, the chat writes to MySQL, but displays the result (the last 70 messages) only when the page is loaded. I would like to do auto-update. Tell me how to do it right? I do not really want to bomb MySQL requests every second

  • for such things, you need to look towards the sockets. - Manitikyl
  • WebSocket (as mentioned above) or Ajax + LongPooling. - Vladimir Klykov
  • Look at the Swoole network framework, all the functionality you need is already there. - Bert

0