Welcome Guest, Not a member yet? Register   Sign In
How to implement EventSource on Codeignigter app?
#11

(02-24-2020, 02:09 PM)daveĀ friend Wrote: Because the model is loaded by the controller it should be possible to send the message from the model. The key is sending a proper message. You cannot go to another controller until the processing is done though.
But I can send them during the process, yea? And what would it look like? This is what I have been trying to use in my model, but it dosen't work (Works in the controller, though, until I call the model):

Code:
header("Content-Type: text/event-stream");
header("Cache-Control: no-cache");
header("Connection: keep-alive");

echo "Products have been found in that range!";
flush();
Reply


Messages In This Thread
RE: How to implement EventSource on Codeignigter app? - by SmokeyCharizard - 02-24-2020, 03:26 PM



Theme © iAndrew 2016 - Forum software by © MyBB