So my question is: What would be the best way, to make a server-client connection via PHP? My first approach (what I'm using right now) is to do it with AJAX. (with jQuery)
To be a bit more specific: I have a lobby, and a game mode, and my top priorities are the chat, and the in-game users.
What I'm doing right now: I have a PHP file, that updates a record in the database for every user in-game, and another file that cheks this regularly. (let's say in every 5 seconds) The problem with this, that there're a lot of mysql calls, lots of ajax call, and sometimes when the ajax can't load in time, the record won't update in time, ergo -> the user gets disconnected.
Note that I need this for my dissertation so I have time to do my homework about this even if you give me some links.
Any answers and tips are welcome! Thanks in advance.