I have an API fetcher script that reads values from XML files and updates data to mysql. It updates the database everytime it's called via ajax.
Now I want to set an interval for about a day before the query gets updated. Which php function or method should I use?
I think I should make myself a little more clear, these are the steps:
- xml file read with php
Echo the results.
-
--->If (mysql updated time > 24*60*60 seconds) update the db
--->if not, do nothing.
I can't figure out how should I process the step (3)