I am doing a websocket demo (phpserver), websocketdemo_PHP tutorial

Source: Internet
Author: User
I made a websocket demo (phpserver) and websocketdemo. I made a websocket demo (phpserver), websocketdemonotice: execute php files such as php-qc: pathserver through the command line. php accesses 127.0.0.1web through a local web server. a websocket demo (php server) and websocketdemo are developed by me.

Notice:

Execute the php file through the command line, such as php-q c: \ path \ server. php.

Access http: // 127.0.0.1/websocket/index. php through a local web server.

Notice:
Php5.3 or above is required, and a web server such as apache
The browser must support html5 web socket
Listen to socket port 9505 here. if the port is occupied, you may need to modify the port or kill the corresponding port process in the two files.

The mobile phone on the page looks better than on the pc!

1. client code html file

1. client code: Chatdemo

Simple chat demo

Send

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.