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

powershell Start-Process exit code -1073741502 when used with Credential from a windows service environment -

twig - Using Twigbridge in a Laravel 5.1 Package -

c# - LINQ join Entities from HashSet's, Join vs Dictionary vs HashSet performance -