ajax - How manage multiple users in php chat system? -


How can I manage multiple users in a php-ajax based chat system? For example, I have 10 people in the server and from any person. I want to manage these 10 people.

This is a very common question, but I made one of them a long time ago, maybe I Whatever I can remember, can help:

  • You will obviously need the primary key reference for each person.
  • Again, I think I had a log file for every current conversation (I do not remember the per capita or conversation).
  • I had client-side javascript, any change in the timeout loop request log file
  • when the chat was over / the window was closed, the log was removed Or downloaded or whatever.
  • Perhaps somehow the system should mess up DDOS to soften the attacks

    edit - the second point explained < / P>

    Conversation data must be stored elsewhere. Since you can not access the user's filesystem through your browser, you have to store everything on your server. After the option is in a file or database, you have to align the stored data in the correct conversation.

    Assume that you select "File", you can assign them a user = & gt; Can organize for Multiple conversations or multiple users = & gt; A conversation (or a huge file, I think, though it would be pretty ugly)

Comments