Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

PHP curl_multi_exec Function

PHP curl_multi_exec Function

PHP Calendar Reference Manual PHP cURL Reference Manual

(PHP 5)

curl_multi_exec — Run the sub-connections of the current cURL handles


Description


int curl_multi_exec ( resource $mh , int &$still_running )

Processes every handle in the stack. This method can be called whether the handle needs to read or write data.


Parameters

** mh**

A cURL multi handle returned by curl_multi_init().

still_running

A reference to a flag used to determine whether the operation is still running.


Return Value

A cURL code defined in the cURL predefined constants.

Note: This function only returns errors related to the entire multi stack. Even when CURLM_OK is returned, individual transfers may still have problems.


Example

This example creates 2 cURL handles, adds them to a multi handle, and then runs them in parallel.




PHP Calendar Reference Manual PHP cURL Reference Manual