Questions tagged [phpwebsocket]

phpwebsocket is a server-side implementation of a WebSocket server using the PHP language. WebSocket is an API and a protocol for bi-directional, full-duplex communication that is closely associated with HTML5 and implemented in recent versions of most web browsers.

290 questions
4
votes
1 answer

One or more reserved bits are on: reserved1 = 0, reserved2 = 1, reserved3 = 1

In Chrome 50.0.2661.94 m var a = new WebSocket('ws://192.168.0.153:9000/socket_listener_1_WINDOWS.php'); ERROR (from Yesterday afternoon- It works on the other clients pc's, but also "ws://echo.websocket.org/" works using my pc as…
4
votes
3 answers

Websockets - Getting Data (Polling?)

This may be a silly question to some who have wrapped their head around it already and maybe I just need more coffee. Question: Whether using websockets or ajax it seems like there is still some polling happening. Is this correct? Example (not real…
Jesse
  • 2,790
  • 1
  • 20
  • 36
4
votes
1 answer

How to use websocket in codeigniter to update content without page refresh

I am working in php framework codeigniter. Now I want to update records via websocket so that information update without page refresh. I can use ajax , jquery but I need to do this via websocket. So please anyone can help how to accomplish this…
user2935236
  • 189
  • 2
  • 11
4
votes
1 answer

How to show connected user online using ratchet?

Can you please tell me how to show connected user online using ratchet? I mean I want to send some kind of userid to the server and broadcast this id to all other connected users showing that this userid is online.
user2886149
  • 41
  • 1
  • 3
4
votes
3 answers

Error with PHP Websocket and Wamp Server

I'm really new about this of Websockets, i'm trying to connect this websocket: phpwebsocket with WAMP server, first, in my httpd.conf I wrote listen 9300, and if i go to localhost:9300 it works right, but when I go to console and write: php -q…
Darkness
  • 101
  • 1
  • 13
3
votes
2 answers

Laravel websockets + Laravel Echo doesn't listen my events

I'm using https://docs.beyondco.de/laravel-websockets/ to handle websockets. But it looks like in console (after run php artisan websocket:serve i see my api messages in logs there) and in dashboard(http://localhost:8080/laravel-websockets) it…
3
votes
0 answers

Php stream socket: The connection to wss://host:port was interrupted while the page was loading

I am having issue with web socket connection/handshake from Firefox to my server written in Php. Problem is when I try to connect client(using js/php or even websocket.org/echo.html) I get issue and the issue is client is firstly connected and then…
Zami
  • 31
  • 4
3
votes
1 answer

Do we need a static IP to use HTML5 Websockets?

I am in the process of building a chat application in PHP using Web Sockets. I started with the code phpwebsocket project and here. The code works fine on my local machine but when i try it on my site (does not have a dedicated IP) it has a problem…
Nithin
  • 415
  • 4
  • 14
3
votes
2 answers

WebSocket opening handshake timed out php Ratxet websocket

I'm creating my first websocket, it works locally with ws, now I uploaded it to a server and uploaded all files and execute the websocket from ssh. And I get this error: WebSocket opening handshake timed out I tried adding this line to…
Exale
  • 51
  • 6
3
votes
1 answer

"Missing Service" When declare new Topic in Symfony

I'm implementing sockets on my app, so I did these steps: Create the topic handler service, like this but with an Entity Manager on his __construct method. public function __construct(EntityManager $em, ClientManipulatorInterface $client) { …
Oscar
  • 1,929
  • 3
  • 16
  • 31
3
votes
2 answers

Get real user IP with PHP Ratchet Web socket server

I have been using PHP Ratchet with Stunnel for SSL. It's working well. But the problem is, I can't get users real IP address. I already tried these $conn->remoteAddress and with this I am getting 127.0.0.1 (local…
h_h
  • 1,201
  • 4
  • 28
  • 47
3
votes
1 answer

Websocket server on AWS EC2 instance doesn't respond after two days of inactivity

We are using AWS EC2(ubuntu-xenial-16.04-amd64-server) instance for running PHP Websocket server. We are using following command, in order to keep WebSocket server running continuously. nohup php -q server.php >/dev/null 2>&1 & It is running very…
3
votes
2 answers

How can I establish connection between a client and a server where the server sends new messages to the client?

I need to establish connection between a client and a server via PHP websocket. The server will need to keeps checking with an external API for new messages and send them to the client. I would like to understand the concept so I can code it. I have…
Junior
  • 11,602
  • 27
  • 106
  • 212
3
votes
1 answer

Redis pubsub with Ratchet

I have a socket configured with Ratchet to listen to messages in the client like this: var sock = new WebSocket("ws://localhost:2000"); sock.onmessage = new function(evt){ //Listen to redis subscribe } sock.onopen .. sock.onclose .. I am trying…
Pavel
  • 31
  • 1
  • 2
3
votes
0 answers

php websoket One or more reserved bits

I am working on php web socket I had successfully created web socket and other devices are successfully connected with it. But after some time it will not allow us to connect.I am getting this error: êInvalid reserved bit WebSocket connection to…
om prakash
  • 41
  • 1
  • 5
1 2
3
19 20