In general, I recently came across such an article about how to organize personal messages on Socket.io + MySQL. I was very interested in this idea, I decided to try to do something. Installed node.js, necessary modules, launched the server, created a table of messages and users. But I absolutely do not understand how to organize messages.php, for example, to get the user's id, for example, when I click on his name on the page.

    1 answer 1

    There you can do without php at all, everything is handled on the node side.

    Help me with the code: https://github.com/vanbosse/websockets-demo

    And then read: Socket.IO + Node.JS a couple of questions

    You need to create an asynchronous request to the node. Nod will check the ID and give the answer. If I understood correctly what is needed.