stream_get_meta_data — Retrieves header/meta data from streams/file pointers.
Returns information about an existing stream.
Example
<?php $url = 'http://www.phpcodez.com/'; if (!$fp = fopen($url, 'r')) { trigger_error("Unable to open URL ($url)", E_USER_ERROR); } $meta = stream_get_meta_data($fp); echo "<pre>";print_r($meta); fclose($fp); ?>