I want to develop a system that perform specific task based on time however, if i use php time function for example if some 1 change the server time it affect my program any solution to avoid using server time?
Asked
Active
Viewed 43 times
-3
-
2php uses the servers time, so yes. – Oct 23 '18 at 05:05
-
what do you mean "if someone changes the server time?" like an intruder? – Rotimi Oct 23 '18 at 05:40
-
Look for php [cron jobs](https://stackoverflow.com/questions/18737407/how-to-create-cron-job-using-php) – Bobby Axe Oct 23 '18 at 06:08
-
Yes an intruder – Muktar Muhammed Oct 24 '18 at 07:50
1 Answers
0
I think that you could use a NTP server so your system won't depend on the server time but on a remote server.
There is an working code example in this answer: Retrieve Time from NTP server via PHP - Stack Overflow.

Chocolord
- 493
- 3
- 12