Git Product home page Git Product logo

phpwebsocket-chat's Introduction

# A simple PHP WebSocket server example.

To run, open a terminal and type:
php5 ./server.php

Then visit index.html in your browser (You may need to set up a webserver to serve it).

You'll need IE10+, FF7+ or Chrome 14+ to run this example.


## Licensing
The contents of this repository are licensed under the Apache License, Version 2.0. See
[LICENSE](https://github.com/Flynsarmy/PHPWebSocket-Chat/master/LICENSE) for the full
license text.

phpwebsocket-chat's People

Contributors

flynsarmy avatar svendowideit avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

phpwebsocket-chat's Issues

wss support

Hi,
congratulations for the the personal implementation of the WebSocket server. I'm going to use your library for a personal open source project. I have one very important request. Is it possible to add the "wss" (WebSockets over SSL/TLS) protocol support inside the php class library (I need it for my project)?

Thank you.

socket error when trying to access client from remote computer.

i have installed a xampp server in computer A .I start the server in computer A and then I am trying to access client.php page (url is ipadresssofA/project/client.php) from computer B using the ip address of computer A. But it is displaying socket error.

And when i try same url on computer A (url is ipadresssofA/project/client.php). client get connects.BOTH COMPUTERS ARE CONNECTED WITH SAME WIFI

Whats the license?

at this point, no-one can legally clone or use your code - is this intentional?

channel / rooms / groupchannels

hi! i trying to add a channel / rooms / groupchannels function to your websocket server. but until now without any success :( .

have any one some tipps for me ;) ?

optimizing server for image transfer

Hello. Great code.

I try to implement server for transferring multiple images, which forms animation from one client to another.

The problem is there is a big gap delay between two clients. When the image changed on client 1, the client 2 will update image after some time approx 1 second. And another problem after some time, the client 2 stops receiving any messages from server.

I transfer from client 1 to client 2 messages which contains link to the image on client 1. I need transfer messages with time 40 ms.

I tried to modify parameters const WS_TIMEOUT_RECV, const WS_TIMEOUT_PONG. the situation is same.

Could you please help me with this issue?

To increase server receiving and sending capabilities within 40 ms?
Thank you.

All browser can’t establish a connection to the server at wss://

Hello friends
When I get the file server in ssh I will start the socket. When I open the site, after a few seconds, the spark will appear below :
Firefox can’t establish a connection to the server at wss://
And so on ssh
The message disconnect Appears.
please direct me?

Socket_create() Missing PHP 5

PHP Fatal error: Call to undefined function socket_create() in ../public_html/chat/class.PHPWebSocket.php on line 103

PHP 5.4.20 (cli)
Copyright (c) 1997-2013 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2013 Zend Technologies

How to close the server?

great script! I got it running. But no idea how to close it again? is this websocket open for eternity now haha

wss error

Hey!
This code works perfectly..
We only need an example to use this code with HTTPS.
There is an error:
"WebSocket connection to 'wss://myip:port/' failed: Error in connection establishment: net::ERR_CONNECTION_CLOSED"
How can we fix it??

command prompt error.

Hi thanks for your code.
but, when i type "php5 ./server.php" command it giving following error.

C:\xampp\htdocs\PHPWebSocket-Chat-master>php5 ./server.php

'php5' is not recognized as an internal or external command,
operable program or batch file.

No works in one tab!

the functions on fancywebsocket.js no works when just one window is open, but when more than one window is open (browser) run normally.

How can we send the logged in user id

hi , first of all thanx for this code. i am using this library to implement a chat application , problem is how can i send the logged in user id when a user connects to socket with function

Server.bind('open', function(data)
{
var user='user->name); ?>';
alert(data);
});

I am doing something wrong?

This might seem like a dumb error because im new to sockets and ssh. I have run the server over at http://stagfoo.com/echo-chat/ but i get the message disconnected whenever i go to the client page and then no messages are seen on other clients. I am doing something wrong?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.