Hi,
Currently, if you open an HTTP stream using fopen(), and then call
stream_get_meta_data() on it, you obtain an associative array within
which as another with the key 'wrapper_data'. Inside that, there is a
list of the HTTP headers from the server response. I'd like to make this
a little more useful as currently I don't believe there's a way to get
the response code from the remote end without parsing those headers
yourself. While this isn't hard, I'd like to make the following changes:
* move the current contents of the wrapper_data array to a key called
'headers' within wrapper_data;
* Add a 'response_code' key, with the server response code as an integer
* Optionally, add things like the mime type of the response.
Anyone got any thoughts on this? I appreciate it'd be a BC break, but I
think it might be useful.
--
Cheers,
Michael
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php