How to identify the user in Ratchet PHP

Asked

Viewed 206 times

1

I’m creating a multi-room chat with websockets, using PHP Ratchet. The framework itself facilitates the process of identifying the user, seeking his name through cookies, as can be observed here: http://socketo.me/demo.

In my local environment (localhost) I do not get this information. I believe it is some problem with cookies. How can I retrieve this data with cookies to identify the user in a local environment?

  • you should try to save a cookie locally to see if it is saving...

  • Hello Lauro, thanks for the reply. Yes, I am recording my cookie locally, but it does not send. I have already tested the recording of the cookie in both PHP and Javascript, using the Jquery Cookie library. On my client, I record the cookie and open the connection using the Autobahnjs session, as explained in Ratchet’s tutorials. But my server does not receive the value of the saved cookie. I believe it is a feature of the local environment. How could I send it? Some information missing at the opening of the Autobahn session?

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.