To pick the number of pages, how to separate part of the

Source: Internet
Author: User
Collect more pages, how to separate part of the
Connection $url=array () a total of 1000 pages of the URL address,

I wrote a collection class.

foreach ($url as $key = = $value) {
$get _json_contetns= $caiji->getjson ($value);
$excel _contetns[]= $caiji->getcontents ($get _json_contetns, $key);
}

The $excel_contetns that Xunhua out like this is what I want to collect.

When I collected 50 pages below, fortunately, when the number of pages, on the acquisition time-out, but also asked the hero, I how to deal with it???
------Solution--------------------
Depositing $url into a database
Successive reads from the database $value performing the acquisition, in the event of a new URL, repeat the first step
------Solution--------------------
Don't stick to the "no database", the essence of the problem is to split a single task into multiple tasks to complete
  • 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.