Re: PHP cURL to achieve simulation login and collection method of use
for large collection work, in order to improve the efficiency of collection, multi-threaded acquisition provided by PHP cURL is essential. The multi thread collection example provided in the manual seems not to be very good, and I've just started testing several examples from it, but I found that all the execution cards were dead, it was impossible to perform it, and a few days before, I suddenly tested it again, and then found that the Example #1 under the curl_multi_info_read function is execable, its content. On $res, but not printed, and YAHOO's request is relatively slow, will be stuck, the front two links can return normally.
but, fortunately, the example is not good, then I through the search to find a good project, CurlMulti
https://github.com/ares333/php-curlmulti
I don't introduce much about the use of CurlMulti. It provides demo on the official website. The use process has a technical problem that can be directly added to the Q group (cURL advanced technology 215348766), and the author @Ares and other collection cows will provide technical solutions.
below is a simple example of PHP cURL Multi:
[code] $urls = array (
array)