Hello guys, does anybody know how to create a timer in PHP that runs even when the user goes offline. I am working on a project, actually a text based game, that needs a timer that runs continuously even after the user goes offline. The game is something like mafia wars in Facebook. It has an energy regeneration timer that needs to run continuously while the players energy is not full.
For example, the player's max energy is 20. then, he uses 5 energy points to do a certain job. His energy goes down to 15. Let's say the energy timer is set to 3 minutes before it adds one energy point. The timer will be counting down from 3:00 to 0:00. If the timer reaches 0:00, the player's energy will be incremented by 1. Then, the timer will be reset to 3:00 minutes. This will go on until the players energy reaches 20 even after the user goes offline. Is this possible? I really hope it is.. please help.. thanks in advance... I'm kinda new in php so please walk me through it.. ^_^