Jump to content

file_get_contents at certain time


kevin87

Recommended Posts

Hi Everyone,

 

I have an interesting question that I have had a hard time searching for so I thought I would throw it on here to see if you guys could help. I am currently using the following to load a file to $html using 

$html = file_get_contents("text.txt");

Is there a way to have this file load at a certain time of the day. For example, it loads the file at 8PM every day?

 

Thanks,

Kevin 

Link to comment
https://forums.phpfreaks.com/topic/285754-file_get_contents-at-certain-time/
Share on other sites

Probably, but your question doesn't make sense. Load into what? What is changing and how does that affect what you're doing with $html? It sounds like the problem you're trying to solve may be much simpler than you think it is.

Yeah sorry it is a little confusing maybe I can ask it a little better. Lets say my text.txt file is changing constantly and I have users visiting my page consistently I only want my $html variable to get the contents from text.txt at 8PM. The reason for this is because the file is changing all the time and I want to get the info exactly at 8PM. Does that make more sense?

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.