PHP timer for a javascript function -


i have setinterval timer , stores information database. somehow people manage cheat me. need php function calculate time since javascript timer has started , save time in db? possible?

i think call php script using ajax call setinterval. can use in you're ajax complete callback :

var end = new date().gettime(); var time = end - start; // start defined before ajax call console.log('execution time: ' + time); 

if need calculate form server-side, use time() in php


Comments

Popular posts from this blog

gcc - MinGW's ld cannot perform PE operations on non PE output file -

How to connect android app to App engine -

hadoop - Running Map Reduce Job shows error - Mkdirs failed to create /var/folders/ -