Has the webmaster researched PHP cms? The mechanism of timed release is similar to Weibo fixed-point timing release.
Reply content:
Has the webmaster researched PHP cms? The mechanism of timed release is similar to Weibo fixed-point timing release.
You should use a planning task. Or how to trigger it regularly?
As I said upstairs, it's really a planning task , but there are several ways to implement it:
- The use of host system features: Specifically, the Linux host using crontab implementation (CPanel Panel is a write clock daemon , the other should be called Cron it), Windows seems to be called a scheduled task
- Write the code for the timed task in a file and then include the file in the form of a picture on the home page, and set the image size to 1px. This code is executed when someone visits the home page . For example:
The
cron file code is as follows:
If (the time now is 8:00) output "Good Morning"
Add this code to the home page, as long as someone to visit the first page will be a judgment, and because it is a size of 1px invalid image, so does not affect the loading speed of the page.
The difference between the two methods is that one is the system automatically access code page, and the other is the user access code page, the system access can be timed execution , and user access unless your traffic is particularly large, it is difficult to do timed execution, can only be automated execution . However, the first method requires high host, Linux needs to be installed with crontab, and the second method has no specific requirements for the host.
The use of crontab is a good choice,
User triggers can affect quantity ....