From 6b08984abd8a621afe1c19d5c1386f703864a4fb Mon Sep 17 00:00:00 2001 From: Daniel Egeberg Date: Sun, 11 Apr 2010 10:12:27 +0000 Subject: [PATCH] Integrated user notes 97253 and 97254 both by pcdinh at phpvietnam dot net into the manual. git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@297829 c90b9560-bf6c-de11-be94-00142212c4b1 --- .../curl/functions/curl-multi-info-read.xml | 104 ++++++++++++++++++ 1 file changed, 104 insertions(+) diff --git a/reference/curl/functions/curl-multi-info-read.xml b/reference/curl/functions/curl-multi-info-read.xml index 5988c7d9cf..9e6efbe66a 100644 --- a/reference/curl/functions/curl-multi-info-read.xml +++ b/reference/curl/functions/curl-multi-info-read.xml @@ -54,6 +54,110 @@ On success, returns an associative array for the message, &false; on failure. + + + Contents of the returned array + + + + Key: + Value: + + + + + msg + The CURLMSG_DONE constant. Other return values + are currently not available. + + + result + One of the CURLE_* constants. If everything is + OK, the CURLE_OK will be the result. + + + handle + Resource of type curl indicates the handle which it concerns. + + + +
+
+ + + + &reftitle.examples; + + + A <function>curl_multi_info_read</function> example + + $url) { + $conn[$i] = curl_init($url); + curl_setopt($conn[$i], CURLOPT_RETURNTRANSFER, 1); + curl_multi_add_handle($mh, $conn[$i]); +} + +do { + $status = curl_multi_exec($mh, $active); + $info = curl_multi_info_read($mh); + if (false !== $info) { + var_dump($info); + } +} while ($status === CURLM_CALL_MULTI_PERFORM || $active); + +foreach ($urls as $i => $url) { + $res[$i] = curl_multi_getcontent($conn[$i]); + curl_close($conn[$i]); +} + +var_dump(curl_multi_info_read($mh)); + +?> +]]> + + &example.outputs.similar; + + + int(1) + ["result"]=> + int(0) + ["handle"]=> + resource(5) of type (curl) +} +array(3) { + ["msg"]=> + int(1) + ["result"]=> + int(0) + ["handle"]=> + resource(7) of type (curl) +} +array(3) { + ["msg"]=> + int(1) + ["result"]=> + int(0) + ["handle"]=> + resource(6) of type (curl) +} +bool(false) +]]> + + +