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
2
votes
1 answer

Ratchet PHP - Push messaging service

Most of the examples I'm looking at with Ratchet are for chat services, and I'm currently building an application where the user logs in and receives notifications from the server based on their user ID. I have the basic tutorials working, however…
Alias
  • 2,983
  • 7
  • 39
  • 62
2
votes
1 answer

PHP Websockets Mysql Pub/Sub

I have this "crazy" project starting, the idea behind it is quite clear: There is some software that writes to MySQL database. The interval between queries are 1 second. Now I need and web interface which loads those database records, and continues…
antanas_sepikas
  • 5,644
  • 4
  • 36
  • 67
2
votes
1 answer

Could not bind to tcp://127.0.0.1:8080: Address already in use

After developing most of the site, I needed to introduce the ability to push data from the server to client. After some research I decided to use Ratchet (I'm using Laravel 4.1). I've implemented my pushUpdate class, but I'm having issue starting…
Moe
  • 470
  • 1
  • 9
  • 26
2
votes
2 answers

How to response to all clients with websocket?

I'm working on a small project with PHP-Websocket. The Server side is running with this https://github.com/ghedipunk/PHP-Websockets Server side: require "PHP-Websockets/websockets.php"; class Server extends WebSocketServer { private…
Nấm Lùn
  • 1,277
  • 6
  • 28
  • 48
2
votes
0 answers

PHP - WebSocket set specific client id

I am working with PHP websockets. I am familiar with its basics but I cannot figure out that how can I set a specific ID for user. Now, by default the script sets 1, 2, 3 and so on according to the time the user connected but I want it to set ID…
Muhammad Talha Akbar
  • 9,952
  • 6
  • 38
  • 62
2
votes
1 answer

PHP websocket disconnects automatically

I am using websocket functionality for my project for messaging purpose. I am using PHP websocket which I have downloaded from following link https://github.com/Flynsarmy/PHPWebSocket-Chat . But my problem is my web socket automatically gets…
user2260521
  • 65
  • 2
  • 6
2
votes
1 answer

HTML5 php websocket

I'm new to HTML 5, websocket. We are trying application like white board.Users who all are logged in that particular session can type their thoughts in white board div. It should display to all users who are logged in that session. So i tried to use…
Dhinesh.B
  • 461
  • 4
  • 10
  • 20
2
votes
1 answer

Whether or not to use iframe in an application

I am creating an application that will use Web Sockets for a notification system. Is it better to have the application in an iframe with the Web Sockets in the parent so there isn't a new connection every time a page is loaded? Or maybe it should…
Bradley Weston
  • 425
  • 1
  • 7
  • 17
2
votes
1 answer

While loop speed in websocket php server

I am using the following websocket php class as my server: PHPWebSocket. It works well in every way I could have hoped for, but I've run into a bit of a problem. I want to update the positions of connected clients (they can walk around) at a rate of…
Theik
  • 123
  • 6
2
votes
2 answers

can I store session information in websocket server

I have a chat application using PHP web socket. and I have almost completed it.now when refresh the page the connection has broken from server and I have to reconnect to it.and my requirement is how to maintain the session for each user and…
madan
  • 773
  • 13
  • 38
2
votes
1 answer

Zend 2 websockets

Could someone bring some examples of how to work with websockets using zend framework 2? I need some hints to start I would like to achieve some kind of facebooks push messages and real time chat and notifications If someone could share his…
user1650441
  • 455
  • 3
  • 12
2
votes
1 answer

How to pass twilio sms through server websocket to client side

I am trying to setup my server so that I can have someone contact me through a chatbox on our website. Since I won't be there at all times to monitor the chats, I am trying to setup a system where the chat is routed through a websocket to my server…
anonymousfox
  • 769
  • 2
  • 9
  • 19
2
votes
1 answer

How to send WebSocket hybi-17 frame with php server

I try to implement a WebSocket Server in PHP handshaking and recieving data works well but if i try to send data to the client, Chrome 19 says "A server must not mask any frames that it sends to the client." But I don't mask the data. My code looks…
low_k0
  • 21
  • 4
1
vote
0 answers

Unable to connect to PHP Websocket Server

I am trying to set up a PHP websocket server using phpwebsocket. Everything I have done is exactly per the phpwebsocket files (with the exception of changing the server to localhost and adjusting ports). I am trying to do this on Windows 7 with…
Major Toht
  • 41
  • 1
  • 6
1
vote
2 answers

HTML5 WebSocket with hybi-17

Update: I solved the decoding problem, thanks to pimvdb Follows the solution (in PHP): $len = $masks = $data = $decoded = null; $len = ord ($buffer[1]) & 127; if ($len === 126) { $masks = substr ($buffer, 4, 4); $data = substr ($buffer,…
Wilk
  • 7,873
  • 9
  • 46
  • 70