PHP timer for a javascript function
615
I have asetInterval
timer and it stores its information into database. Somehow people manage to cheat me. What I need is a PHP function to calculate time since Javascript timer has started and save time in DB? Is that even possible?
Answer
Solution:
I think you call your PHP script using an Ajax call from setInterval. So you can use in you're ajax complete callback :
If you need to calculate it form server-side, use time() in PHP