CURLOPT_RETURNTRANSFER with curl_multi

I am using curl_multi functions with PHP. I already know that you can return the contents of a request from curl_execwhen the flag is CURLOPT_RETURNTRANSFERon. However, how can we capture the query contents of multiple queries as strings when used curl_multi_exec?

Returns an array when this flag is set?No, it curl_multi_execcan return only trueor false, without the possibility of returning the contents, as usual.

+3
source share
1 answer

It turns out that the function curl_multi_getcontent, although somewhat inelegant, works to get the contents in the form of strings from each individual corrector.

+4
source

Source: https://habr.com/ru/post/1762264/


All Articles