I have developed a web app which shows information in real time from certain actions carried out by different users. For this I use websockets, built in PHP, in a local environment (WAMP) and works fine, but I need this to also work on an external server (web hosting service), which I only have access to through the CPanel and
Tag: websocket
How To Make Realtime Progressbar Without PHP Pusher
I am stuck in this problem, about making realtime progressbar on php (without php pusher) Let’s say I have 10 rows of data, that will be inserted to database. Now how to send the progressbar data, while also inserting to database. I will really appreciate your answers. Thanks. Bellow is my code example: Answer Web servers and browsers will not
php server socket & webSocket HTML5 client
what i’m trying is connect the client [webSocket] with PHP server socket my server socket will accept the socket from client, and fetch the Request headers, after receiving the Request, i sent back handshake [response] But the status for webSocket [client] is pending and never get the response JS code: and my PHP server Socket: handshake function: After sending the
PHP Websocket Client – Keep connection open
I am using PHP-WSS in a laravel application and need to keep a websocket client open to receive various messages from the websocket server. So far I built a CLI php script that I can execute and wait for messages to arrive. I built the following function to test… The question is, to keep the connection open for any messages
Websockets file upload is corrupted (or wrongly encoded) – PHP and JS
I´m working on websocket scripts in PHP and JS and have issue with saving a file (img) Sending from JS: Saving in PHP It saves the file, but it is corrupted, or wrongly encoded… The uploaded picture is slightly smaller (few bytes) and there is nothing readable in hexeditor (while in original I can read header and so on) What
PHP socket_read waits for data to read
I’m new to socket stuff, here is my piece of code: client read method is just: Nothing will be executed after $status = $this->client->read(), untill socket_read() reads new data. I would like to stop socket_read() acting like waiting for data to read or call socket_read() only when there is any data to read. I couldn’t get any idea, how to
Php Show Online Users with Pusher or socket.io
I have a forum page. On the only index page, I show an online user list that shows usernames. I use Pusher. It works great. I have a problem about which my customer is complaining. The problem is that when a user browses to other pages, his/her username disappears and re-appears again. His/her connection to Pusher is lost on every
How to get room id in laravel broadcast channel.php
Here is my js Here is PersonalChat.php Here is My channels.php I asked my question in my channels.php and PersonalChat.php Again May I say My question is ** How to get room id ** in channels.php and PersonalChat.php Thank you all Sorry for my english skill Answer you can accept param in channel.php like {roomId} then in call back you
How to run cmd commands via PHP script for initialize Websocket server?
I use takielias Codeigniter websocket in my project for notification purpose, first of all i am noob for websocket handshaking connection and WS protocol, here every thing working as per the takielias github page documentation, in his git hub page after all setup, need to run cmd command for run server client connection command is php index.php welcome index after
Laravel websocket cant connect to pusher ERR_CERT_AUTHORITY_INVALID
I have a laravel application with websockets. I already setup all the needs for the websocket and pusher config. But whenever I test my broadcast channel I got app.js:58283 WebSocket connection to ‘wss://127.0.0.1/app/644a4ac1988060882370?protocol=7&client=js&version=6.0.2&flash=false’ failed: Error in connection establishment: net::ERR_CERT_AUTHORITY_INVALID When i do some reload. sometimes i get app.js:55791 WebSocket connection to ‘wss://127.0.0.1/app/644a4ac1988060882370?protocol=7&client=js&version=6.0.2&flash=false’ failed: WebSocket is closed before the connection is