How can I get the status text (not status code) using curl in PHP?
HTTP/1.1 400 Unsupported voice
...
In the above sample HTTP response, I can get the status code with CURLINFO_RESPONSE_CODE.
But what I am interested in is the status text Unsupported voice. I couldn't find a CURLINFO constant for status text.
The only option I can think of is to set CURLOPT_HEADER and parse the response. In case of success response, the response body contains binary data. Hence I am a bit reluctant to use str_* functions on it.
Is there a better solution?