0

How repeat php code every second?

maybe i must use java script to do this?

26th Jan 2017, 12:58 AM
Жадный Кот
Жадный Кот - avatar
1 Resposta
0
You can use javaScript and setup an interval action, however be aware that if the processing of the php and any latency takes more than a second you will have multiple requests to the server running concurrently. Depending on what the php code is doing that may result in collisions. I like to use an Ajax call of some type (raw javaScript or jQuery .ajax) and before I conduct the call I check to see if the previous call was completed.
26th Jan 2017, 2:39 AM
Kevin Gilkey-Graham
Kevin Gilkey-Graham - avatar