Seems you're using php synchronous for client/server? Why not start with socket.io for more interactive?
I have just quit my job.
General LoungeOriginal thread: https://forums.rpgmakerweb.com/threads/i-have-just-quit-my-job.62016/
Original thread: https://forums.rpgmakerweb.com/threads/i-have-just-quit-my-job.62016/