based on code from phpws, which is a php based websocket library
- apache & php
- ability to listen on port 12345, used by websocket
- a web browser
- on windows, make sure that the hosts file contains the line with 127.0.0.1 loalhost
- Windows 7
- with latest Xampp for Windows, a bundled php/apache package for windows, comes w/ php 5.4
- Chrome 22, which is the latest as of time of writing.
- You can put the php files under /var/www/html in linux or somewhere in htdocs if running on windows
- and create the text file to be streamed called sendme.txt in c:\tmp\sendme.txt or /tmp/sendme.txt with the correct read permissions
-
go to the directory where the php files are and run
php -q demo.php
- open up Chrome
- put http://localhost/phpws/client1.html into the address
- follow the instructions on the page