PHP Crawl page with curl will not only crawl half stop

Source: Internet
Author: User
Does PHP crawl the page with curl will not only crawl half stop, if stopped, is to return the part of the HTML code that has been crawled or not at all?


Reply to discussion (solution)

If the other server does not respond properly to you, it will stop. So you need to look at the other side of the server.
The rules are correct and you get the part of the HTML code that crawls to.

Yes! Can be the cause of the network or the other side
After the interruption, will the finished data still be there? It depends on how you write the code.
Conventional notation, naturally, is not, because it is a time-out and fails.
But if you specify a saved file Curlopt_file
or specifies a write callback curlopt_writefunction
It's a chance to get it.

Yes! Can be the cause of the network or the other side
After the interruption, will the finished data still be there? It depends on how you write the code.
Conventional notation, naturally, is not, because it is a time-out and fails.
But if you specify a saved file Curlopt_file
or specifies a write callback curlopt_writefunction
It's a chance to get it.



Does curl have a function to determine if the entire page is loaded?

If the other server does not respond properly to you, it will stop. So you need to look at the other side of the server.
The rules are correct and you get the part of the HTML code that crawls to.



Does curl have any function to determine if the entire page has been loaded? All I need is a loaded page.

Curl_getinfo

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