The php Function Stream_Get_Meta_Data()
The php function stream_get_meta_data() retrieves metadata about an existing stream. The stream may be any stream created by fopen(), fsockopen(), pfsockopen() or stream_socket_client(). The returned data is in the form of an array or object. The default values of the array items are set to null if the function is not called with any parameters.
In addition, the function takes an optional argument which specifies a filter to use with the stream. The filter is used to perform operations on the stream data as it is read from or written to the stream. Any number of filters may be stacked on a stream. Custom filters may be defined either within a PHP script using stream_filter_register() or as an extension using the API Reference in Chapter 63.
Message headers (see Appendix L). The returned data is a tuple of map(str, list(filter)) items. Each item in the tuple contains information about a particular message header. The key is the header name, and the value is the corresponding header value.