I have a dedicated CentOS 6.5 server with Plesk Panel 12 installed, with several sites in php. I would like to develop a chat with node.js and integrate it with some sites made in php. Only this chat needs to retrieve some information from the user that is logged in Ex: The user can only access the chat if it is logged in. What would be the best way to integrate the two things PHP + Node.js?
Solution:
I followed Lauro Moraes' suggestion on this question: Integrating nodejs application with php site into distinct servers ?, and I did what Guilherme suggested. The client logs in to the PHP site, the session data is saved in the database in case I used Redis. In the php part I request Node.js via socket.io by sending the cookie with the session id. In Node.js I get this session id, I consult the Redis database and I release access.