note 110463 added to httprequest.getresponseheader
| From: | coder.ua | Date: | Wed, 24 Oct 2012 17:57:55 +0000 |
| Subject: | note 110463 added to httprequest.getresponseheader | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-191526@lists.php.net to get a copy of this message | ||
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;
}
?>
----
Server IP: 69.147.83.199
Probable Submitter: 91.124.40.98
----
Manual Page -- http://www.php.net/manual/en/httprequest.getresponseheader.php
Edit -- https://master.php.net/note/edit/110463
Del: integrated -- https://master.php.net/note/delete/110463/integrated
Del: useless -- https://master.php.net/note/delete/110463/useless
Del: bad code -- https://master.php.net/note/delete/110463/bad+code
Del: spam -- https://master.php.net/note/delete/110463/spam
Del: non-english -- https://master.php.net/note/delete/110463/non-english
Del: in docs -- https://master.php.net/note/delete/110463/in+docs
Del: other reasons-- https://master.php.net/note/delete/110463
Reject -- https://master.php.net/note/reject/110463
Search -- https://master.php.net/manage/user-notes.php