note 50379 deleted from wrappers.http by nlopess
| From: | nlopess@php.net | Date: | Sat, 26 Feb 2005 20:12:21 +0000 |
| Subject: | note 50379 deleted from wrappers.http by nlopess | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-85600@lists.php.net to get a copy of this message | ||
Note Submitter: php dot osde dot info at oths dot co dot uk
Reason: useless
----
Using stream_get_meta_data() and print_r() to display the actual HTTP meta data headers :
<?php
echo "<pre>";
$url = "http://www.osde.info/";
$fp = fopen($url, 'r');
foreach(stream_get_meta_data($fp) as $response)
{
print_r($response);
}
fclose($fp);
echo "</pre>";
?>
Output:
Array
(
[0] => HTTP/1.1 200 OK
[1] => Date: Sat, 26 Feb 2005 05:29:08 GMT
[2] => Server: Apache
[3] => Last-Modified: Sun, 14 Nov 2004 23:24:18 GMT
[4] => ETag: "2ec334-6ae-4197e922"
[5] => Accept-Ranges: bytes
[6] => Content-Length: 1710
[7] => Connection: close
[8] => Content-Type: text/html
)
HTTPsocket17101