Update once a day and retrieve different categories in a cycle of three days. please advise me to edit the import rules at the end of this post by AspDelphi from 2013-07-1811: 34: 01: the following 10 sets of images with the highest clicks in China and Japan are retrieved in a cycle every three days. the categories are updated every day: & nbsp; every day, how can I retrieve different classes in a cycle of three days?
At the end of this post, the import rule was edited by AspDelphi at 11:34:01 on: 10 sets of datasets with the highest hits in China and Japan were retrieved in a cycle every three days, updated every day.
Retrieval Category:
Street shot for fashion luxury character life
Beauty and wedding star Test Gallery
Cosmetic trial Brand
Shopping Guide
Gallery below
Share:
------ Solution --------------------
That is to say, your program has been okay, but when it exceeds 42 days, there will be a problem, right?
Then you
$ Days = floor ($ e-$ s)/(24*60*60); // get the number of days from today until the first time my program was executed
$ Key = floor ($ days/3); // when the value of $ key exceeds 42 days, it is incorrect.
Add one
$ Days = fmod ($ days, count ($ arr) * 3 );
$ Days = floor ($ e-$ s)/(24*60*60); // get the number of days from today until the first time my program was executed
$ Days = fmod ($ days, count ($ arr) * 3); // $ days is always less than the number of days in a loop.
$ Key = floor ($ days/3); // when the value of $ key exceeds 42 days, it is incorrect.