I’m using the curl_multi functions with PHP. I already know that you can return the request contents from curl_exec when the CURLOPT_RETURNTRANSFER flag is on. However, how can we grab the request contents of multiple requests as strings when using curl_multi_exec?
Does it return an array when this flag is set? Nope, curl_multi_exec can only return true or false, without the option to return the contents like the normal one.
Turns out, the
curl_multi_getcontentfunction, while somewhat inelegant, works for getting the contents as strings from each individual curl handle.