Home >Backend Development >PHP Tutorial >When the live broadcast platform sends gifts and barrages, how does the message server confirm that the messages are sent by the currently logged-in user?
The user clicks to send a gift and sends the message to the message server. The message server requests the back-end interface to modify the database and broadcast the message. Is this process correct?
I don’t know much about the message server, so how does it confirm that the message is sent by the currently logged in user?
The user clicks to send a gift and sends the message to the message server. The message server requests the back-end interface to modify the database and broadcast the message. Is this process correct?
I don’t know much about the message server, so how does it confirm that the message is sent by the currently logged in user?
The request will bring the authentication token, which is usually in the cookie. The server can just check it.
cookie
and session
cookie
uniquely identifies the sessionsession
and saves whether you are logged in and other information
https://www.baidu.com/s?wd=co...
https://www.baidu.com/s?wd=se...