w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
Using server-sent events and php sessions

This is not a good idea. HTTP is a request-response protocol so if you want server-client communication to be bi-directional you will need to look into websockets or something similar. There are also things like "long polling" and "heart beating"

If you want an event loop try something like servlets in apache tomcat.

You will grapple for hours with issues because of your design.

Also check out ajax if you just want to shoot messages from javascript to PHP.

Make sure you know an overview of the tech stack you are working with :)





© Copyright 2018 w3hello.com Publishing Limited. All rights reserved.