With curl_getinfo(), you can fetch the response codes for a request: https://www.php.net/manual/en/function.curl-getinfo.php
$http_code = curl_getinfo($ch, CURLINFO_HTTP_CODE));
There is the function curl_multi_info_read(), but I think it doesn't seem to quite do the same thing: https://www.php.net/manual/en/function.curl-multi-info-read.php
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.
The code example:
var_dump(curl_multi_info_read($mh));
Gives output like:
array(3) {
["msg"]=>
int(1)
["result"]=>
int(0)
["handle"]=>
resource(5) of type (curl)
}
Instead of giving the HTTP response code. Is there a way to fetch the HTTP response code from this returned array? Or maybe some other way in curl_multi() to fetch the response codes?