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

timeout - Handshake_timeout on RabbitMQ using python and pika from remote vm -

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

c# - Search and Add Comment with OpenXML for Word -