Stream Functions
PHP Manual

stream_get_meta_data

(PHP 4 >= 4.3.0, PHP 5)

stream_get_meta_dataRetrieves header/meta data from streams/file pointers

Description

array stream_get_meta_data ( resource $stream )

Returns information about an existing stream . The stream can be any stream created by fopen(), fsockopen() and pfsockopen(). The result array contains the following items:

The following items were added in PHP 4.3.0:

Note: This function was introduced in PHP 4.3.0, but prior to this version, socket_get_status() could be used to retrieve the first four items, for socket based streams only.
In PHP 4.3.0 and later, socket_get_status() is an alias for this function.

Note: This function does NOT work on sockets created by the Socket extension.

The following items were added in PHP 5.0.0:


Stream Functions
PHP Manual