note 117831 added to function.curl-multi-exec

From: Date: Mon, 17 Aug 2015 08:36:37 +0000
Subject: note 117831 added to function.curl-multi-exec
Groups: php.notes 
Request: Send a blank email to php-notes+get-203365@lists.php.net to get a copy of this message
Probably you also want to be able to download the HTML content into buffers/variables, for parsing the HTML or for other processing in your program. The example code on this page only outputs everything on the screen, without giving you the possibility to save the downloaded pages in string variables. Because downloading multiple pages is what I wanted to do (not a big surprise, huh? that's the reason for using multi-page parallel Curl) I was initially baffled, because this page doesn't give pointers to a guide how to do that. Fortunately, there's a way to download content with parallel Curl requests (just like you would do for a single download with the regular curl_exec). You need to use: http://php.net/manual/en/function.curl-multi-getcontent.php The function curl_multi_getcontent should definitely be mentioned in the "See Also" section of curl_multi_exec. Probably most people who find their way to the docs page of curl_multi_exec, actually want to download the multiple HTML pages (or other content from the multiple parallel Curl connections) into buffers, one page per one buffer. ---- Server IP: 72.52.91.14 Probable Submitter: 2001:14b8:201:20:54ca:88e1:cdda:bc99 ---- Manual Page -- http://php.net/manual/en/function.curl-multi-exec.php Edit -- https://master.php.net/note/edit/117831 Del: integrated -- https://master.php.net/note/delete/117831/integrated Del: useless -- https://master.php.net/note/delete/117831/useless Del: bad code -- https://master.php.net/note/delete/117831/bad+code Del: spam -- https://master.php.net/note/delete/117831/spam Del: non-english -- https://master.php.net/note/delete/117831/non-english Del: in docs -- https://master.php.net/note/delete/117831/in+docs Del: other reasons-- https://master.php.net/note/delete/117831 Reject -- https://master.php.net/note/reject/117831 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#203365) next »