periodic (automatic) function calls
Posted: Sat Nov 11, 2006 5:03 pm
Is there a way with PHP to automatically call a function every x seconds and have it perform some functionality?
For a group project, we are developing a web-app that has a graph. The graph needs to be updated every x seconds automatically. Is there an elegant way to do this?
A hack way I can think of is calling a function and running it with WHILE(1) and having it sleep for x seconds and then perform some functionality. I'm sure this is terrible as it will waste unnecessary resources spinning.
Any help would be appreciated it...thanks
For a group project, we are developing a web-app that has a graph. The graph needs to be updated every x seconds automatically. Is there an elegant way to do this?
A hack way I can think of is calling a function and running it with WHILE(1) and having it sleep for x seconds and then perform some functionality. I'm sure this is terrible as it will waste unnecessary resources spinning.
Any help would be appreciated it...thanks