http://ejohn.org/blog/how-javascript-timers-work/
Javascript has timers for functions, is there something similar in PHP as well. In my script, I want one function to run every 50 seconds, and then continuing the script as it is. Is this possible ?
More information : At the start of the PHP script, via an API I generate a session ID which expires every 60 seconds. We can renew that in 60 seconds. So, what I want is, every 50 seconds, a function runs which will renew that session ID with a curl request and then again continue the PHP script, so that I can retrieve images from the web-server I want. Also, I want to run it from console(infinite running script) and not as a server-side language.