note 110463 deleted from httprequest.getresponseheader by aharvey
| From: | aharvey@php.net | Date: | Thu, 25 Oct 2012 01:12:54 +0000 |
| Subject: | note 110463 deleted from httprequest.getresponseheader by aharvey | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-191532@lists.php.net to get a copy of this message | ||
Note Submitter: coder.ua[at]gmail.com
----
Output format:
<?php
$request = new HttpRequest('http://ya.ru',
HttpRequest::METH_GET);
try {
$request->send();
print_r($request->getResponseHeader());
/*
* RESULT
Array
(
[Server] => nginx
[Date] => Wed, 24 Oct 2012 17:47:30 GMT
[Content-Type] => text/html; charset=UTF-8
[Connection] => close
[Cache-Control] => no-cache,no-store,max-age=0,must-revalidate
[Content-Length] => 5301
[Expires] => Wed, 24 Oct 2012 17:47:31 GMT
[Last-Modified] => Wed, 24 Oct 2012 17:47:31 GMT
[P3P] => policyref="/w3c/p3p.xml", CP="NON DSP ADM DEV PSD IVDo OUR IND STP
PHY PRE NAV UNI"
[Set-Cookie] => Array
(
[0] => yandex_gid=143; Expires=Fri, 23-Nov-2012 17:47:30 GMT; Domain=.www.ya.ru;
Path=/
[1] => yandexuid=5048302261351100851; Expires=Sat, 22-Oct-2022 17:47:30 GMT;
Domain=.www.ya.ru; Path=/
[2] => yp=1353692851.ygu.1; Expires=Sat, 22-Oct-2022 17:47:30 GMT;
Domain=.www.ya.ru; Path=/
)
[X-Frame-Options] => DENY
[X-Xrds-Location] => http://openid.yandex.ru/server_xrds/
)
*/
print_r($request->getResponseHeader('Date'));
/*
* RESULT
string(29) "Wed, 24 Oct 2012 17:54:11 GMT"
*/
} catch (HttpException $ex) {
echo $ex;
}
?>