PeterPopper Posted November 11, 2009 Share Posted November 11, 2009 I have a file on my server that other websites are linking to. The file contains data that will be changed once a day. The problem is that I only want the other websites retrieving the file from my server at 10am and 10pm. The other times (anytime besides 10am and 10pm), I want them to get a cached version of the file from my server. How do I do this with PHP? Thanks. Quote Link to comment https://forums.phpfreaks.com/topic/181163-caching-data-at-specified-time-periods/ Share on other sites More sharing options...
PeterPopper Posted November 12, 2009 Author Share Posted November 12, 2009 Anyone? Quote Link to comment https://forums.phpfreaks.com/topic/181163-caching-data-at-specified-time-periods/#findComment-956188 Share on other sites More sharing options...
otuatail Posted November 12, 2009 Share Posted November 12, 2009 You can get the server time with time() but if you want to access a file directly like MyFiles/Document1.pdf Then no. It will always be available. Desmond. Quote Link to comment https://forums.phpfreaks.com/topic/181163-caching-data-at-specified-time-periods/#findComment-956202 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.