|
| 1 | +<?xml version="1.0" encoding="utf-8"?> |
| 2 | +<!-- $Revision$ --> |
| 3 | +<!-- EN-Revision: 3f1cd5121f7c9f8347ca69c8f657fdb24c0f9729 Maintainer: Ippey Status: ready --> |
| 4 | + |
| 5 | +<refentry xml:id="function.http-get-last-response-headers" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink"> |
| 6 | + <refnamediv> |
| 7 | + <refname>http_get_last_response_headers</refname> |
| 8 | + <refpurpose>最後の HTTP レスポンスヘッダーを取得します</refpurpose> |
| 9 | + </refnamediv> |
| 10 | + |
| 11 | + <refsect1 role="description"> |
| 12 | + &reftitle.description; |
| 13 | + <methodsynopsis> |
| 14 | + <type class="union"><type>array</type><type>null</type></type><methodname>http_get_last_response_headers</methodname> |
| 15 | + <void/> |
| 16 | + </methodsynopsis> |
| 17 | + <simpara> |
| 18 | + <link linkend="wrappers.http">HTTP ラッパー</link> を介して受け取った最後の <acronym>HTTP</acronym> レスポンスヘッダーを含む |
| 19 | + <type>配列</type> を返します。 |
| 20 | + レスポンスヘッダーがない場合は、 &null; を返します。 |
| 21 | + </simpara> |
| 22 | + </refsect1> |
| 23 | + |
| 24 | + <refsect1 role="parameters"> |
| 25 | + &reftitle.parameters; |
| 26 | + &no.function.parameters; |
| 27 | + </refsect1> |
| 28 | + |
| 29 | + <refsect1 role="returnvalues"> |
| 30 | + &reftitle.returnvalues; |
| 31 | + <simpara> |
| 32 | + <link linkend="wrappers.http">HTTP ラッパー</link> を使って受け取った <acronym>HTTP</acronym> ヘッダーを |
| 33 | + インデックス付きの <type>配列</type> で返します。 |
| 34 | + ヘッダーがない場合は、 &null; を返します。 |
| 35 | + </simpara> |
| 36 | + </refsect1> |
| 37 | + |
| 38 | + <refsect1 role="examples"> |
| 39 | + &reftitle.examples; |
| 40 | + <example xml:id="function.http-get-last-response-headers.example.basic"> |
| 41 | + <title><function>http_get_last_response_headers</function> example</title> |
| 42 | + <simpara> |
| 43 | + Description. |
| 44 | + </simpara> |
| 45 | + <programlisting role="php"> |
| 46 | +<![CDATA[ |
| 47 | +<?php |
| 48 | +file_get_contents("http://example.com"); |
| 49 | +var_dump(http_get_last_response_headers()); |
| 50 | +?> |
| 51 | +]]> |
| 52 | + </programlisting> |
| 53 | + &example.outputs.similar; |
| 54 | + <screen> |
| 55 | +<![CDATA[ |
| 56 | +array(14) { |
| 57 | + [0]=> |
| 58 | + string(15) "HTTP/1.1 200 OK" |
| 59 | + [1]=> |
| 60 | + string(20) "Accept-Ranges: bytes" |
| 61 | + [2]=> |
| 62 | + string(11) "Age: 326940" |
| 63 | + [3]=> |
| 64 | + string(29) "Cache-Control: max-age=604800" |
| 65 | + [4]=> |
| 66 | + string(38) "Content-Type: text/html; charset=UTF-8" |
| 67 | + [5]=> |
| 68 | + string(35) "Date: Mon, 11 Nov 2024 13:34:09 GMT" |
| 69 | + [6]=> |
| 70 | + string(23) "Etag: "3147526947+gzip"" |
| 71 | + [7]=> |
| 72 | + string(38) "Expires: Mon, 18 Nov 2024 13:34:09 GMT" |
| 73 | + [8]=> |
| 74 | + string(44) "Last-Modified: Thu, 17 Oct 2019 07:18:26 GMT" |
| 75 | + [9]=> |
| 76 | + string(24) "Server: ECAcc (nyd/D16C)" |
| 77 | + [10]=> |
| 78 | + string(21) "Vary: Accept-Encoding" |
| 79 | + [11]=> |
| 80 | + string(12) "X-Cache: HIT" |
| 81 | + [12]=> |
| 82 | + string(20) "Content-Length: 1256" |
| 83 | + [13]=> |
| 84 | + string(17) "Connection: close" |
| 85 | +} |
| 86 | +]]> |
| 87 | + </screen> |
| 88 | + </example> |
| 89 | + </refsect1> |
| 90 | + |
| 91 | + <refsect1 role="seealso"> |
| 92 | + &reftitle.seealso; |
| 93 | + <simplelist> |
| 94 | + <member><function>http_clear_last_response_headers</function></member> |
| 95 | + </simplelist> |
| 96 | + </refsect1> |
| 97 | + |
| 98 | +</refentry> |
| 99 | +<!-- Keep this comment at the end of the file |
| 100 | +Local variables: |
| 101 | +mode: sgml |
| 102 | +sgml-omittag:t |
| 103 | +sgml-shorttag:t |
| 104 | +sgml-minimize-attributes:nil |
| 105 | +sgml-always-quote-attributes:t |
| 106 | +sgml-indent-step:1 |
| 107 | +sgml-indent-data:t |
| 108 | +indent-tabs-mode:nil |
| 109 | +sgml-parent-document:nil |
| 110 | +sgml-default-dtd-file:"~/.phpdoc/manual.ced" |
| 111 | +sgml-exposed-tags:nil |
| 112 | +sgml-local-catalogs:nil |
| 113 | +sgml-local-ecat-files:nil |
| 114 | +End: |
| 115 | +vim600: syn=xml fen fdm=syntax fdl=2 si |
| 116 | +vim: et tw=78 syn=sgml |
| 117 | +vi: ts=1 sw=1 |
| 118 | +--> |
0 commit comments