How may I refresh current client view page from the server side? for example, if I want to force refresh for page that is viewing now for all the clients, so they can view the new content. and I want to do this refresh in the time that I want using PHP.
Is it possible??
You can get the behavior in two ways:
WebSockets - If all your clients connect via web sockets, you have a direct connection between the client and the server. You'll need to get creative with timing, but you can certainly send a command at any time requiring a refresh. This requires that you implement web sockets in PHP http://socketo.me/ and JavaScript.
Polling - You can set up the client to send an AJAX request every x seconds. The server responds with a bool value which the AJAX success handler uses to determine whether it should refresh the page.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With