HTML5 - Introducing WebSockets https://www.html5rocks.com/en/tutorials/websockets/basics/
PHP Implementation http://phppot.com/php/simple-php-chat-using-websocket/ or https://github.com/ratchetphp/Ratchet/ or https://www.sanwebe.com/2013/05/chat-using-websocket-php-socket/
warning 1-you have to enable the sockets extension - http://www.php.net/manual/en/sockets.installation.php to php.ini aka
1
extension=php_sockets.dll
2-of course run the server from command line.
origin - http://www.pipiscrew.com/2017/04/php-chat-using-websocket/ php-chat-using-websocket