Php uses curl to crawl a page. Will it only crawl half of the page? will php use curl to crawl the page? will it only crawl half of the page? if it stops, is the html code that has been crawled completely returned?
Reply to discussion (solution)
If the other server does not respond to you normally, it will stop. Therefore, you need to check the server status of the other party.
If the rules are correct, you will get the html code that you crawled.
Yes! It can be the reason for the network or the other party
After the interruption, will the data still be completed? It depends on how you write the code.
The conventional writing is naturally absent, because it eventually fails due to timeout.
However, if you specify the saved file CURLOPT_FILE
Or the write callback CURLOPT_WRITEFUNCTION is specified.
Still have the opportunity to get
Yes! It can be the reason for the network or the other party
After the interruption, will the data still be completed? It depends on how you write the code.
The conventional writing is naturally absent, because it eventually fails due to timeout.
However, if you specify the saved file CURLOPT_FILE
Or the write callback CURLOPT_WRITEFUNCTION is specified.
Still have the opportunity to get
Does curl have a function to determine whether the entire page has been loaded?
If the other server does not respond to you normally, it will stop. Therefore, you need to check the server status of the other party.
If the rules are correct, you will get the html code that you crawled.
Does the curl function determine whether the whole page has been loaded? What I need is the loaded page.
Curl_getinfo