====== Display countdown timer until given date using JavaScript from PHP ====== This function is used in my custom computer exam software to display a countdown timer that stops at the end of the exam. The timestamp is determined and stored in a file when the student clicks "begin exam"((code not included here)) then it is resilient to page reloads since the destination timestamp never changes. Of course the timer is not exact since network latency is not taken into account, but this code is only used on a LAN 8-) function jscd($ts) { $curts=time(); $res=""; $res.=""; $res.=""; return $res; } {{tag>timer countdown timestamp javascript php}} ~~LINKBACK~~