Update once a day, and retrieve different categories in a cycle of three days. please advise

Source: Internet
Author: User
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; Fashion & nbsp; luxury & nbsp; character & nbsp; life & updated every day. different categories can be retrieved in three days for one cycle. please advise

This post was last edited by AspDelphi at 11:34:01

Import rules: the following 10 sets of datasets with the highest clicks in China and Japan are retrieved in a cycle every three days and 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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.