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
Share on other sites

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?

Link to comment
Share on other sites

well now after I wrote all of that I think maybe I should just do a copy of the file on my linux server to a different file at 8PM every day. That would probably be a whole lot easy then doing something crazy with php. 

Edited by kevin87
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.