Answer the question
In order to leave comments, you need to log in
How to make friends Ratchet WebSocket server and $_SESSION and is it worth it at all?
I am developing a website. When entering / registering, the necessary information about the user is written to the $_SESSION variable. When some AJAX request occurs, for example, editing a profile, the server always checks $_SESSION to understand whether this user can edit this profile at all or not and whether the user is authorized at all.
I am developing a chat. Let's say the following information comes to the server:
{
user_from_id: 1,
user_to_id: 2,
message: 'Привет!',
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question