-
Notifications
You must be signed in to change notification settings - Fork 24
/
stream-get-meta-data.xml
325 lines (311 loc) · 8.11 KB
/
stream-get-meta-data.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
<?xml version="1.0" encoding="utf-8"?>
<!-- EN-Revision: cf3707c0f4aab3f7d4d9bfef40827375a6007c0b Maintainer: nilgun Status: ready -->
<refentry xml:id="function.stream-get-meta-data" xmlns="http://docbook.org/ns/docbook">
<refnamediv>
<refname>stream_get_meta_data</refname>
<refpurpose>Akımdan başlıkları/meta verileri döndürür</refpurpose>
</refnamediv>
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<type>array</type><methodname>stream_get_meta_data</methodname>
<methodparam><type>resource</type><parameter>akım</parameter></methodparam>
</methodsynopsis>
<para>
Belirtilen <parameter>akım</parameter> hakkında bilgi döndürür.
</para>
</refsect1>
<refsect1 role="parameters">
&reftitle.parameters;
<para>
<variablelist>
<varlistentry>
<term><parameter>akım</parameter></term>
<listitem>
<para>
<function>fopen</function>, <function>fsockopen</function>
<function>pfsockopen</function> ve
<function>stream_socket_client</function>
tarafından oluşturulmuş bir akım.
</para>
</listitem>
</varlistentry>
</variablelist>
</para>
</refsect1>
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
Elde edilen dizi şu elemanları içerir:
</para>
<itemizedlist>
<listitem>
<para>
<literal>timed_out</literal> (<type>bool</type>) -
Son <function>fread</function> veya <function>fgets</function> çağrısında
veri beklerken akım zaman aşımına uğramışsa &true; olur.
</para>
</listitem>
<listitem>
<para>
<literal>blocked</literal> (<type>bool</type>) -
Akım engellenen kipteyse &true; olur. Bakınız:
<function>stream_set_blocking</function>.
</para>
</listitem>
<listitem>
<para>
<literal>eof</literal> (<type>bool</type>) -
Dosya sonuna ulaşılmışsa &true; olur. Okunmamış baytların sayısı
(<literal>unread_bytes</literal>) sıfırdan farklı olsa bile soket
akımları için bu üyenin değeri &true; olabilir. Okunacak başka veri kalıp
kalmadığını öğrenmek için bu üyenin değerine bakmak yerine
<function>feof</function> işlevini kullanın.
</para>
</listitem>
<listitem>
<para>
<literal>unread_bytes</literal> (<type>int</type>) -
PHP'nin dahili tamponunda kalan bayt sayısı.
</para>
<note>
<simpara>
Bu değeri bir betikte kullanmamalısınız.
</simpara>
</note>
</listitem>
<listitem>
<para>
<literal>stream_type</literal> (<type>string</type>) -
Akımın alt yapısını açıklayan bir yafta.
</para>
</listitem>
<listitem>
<para>
<literal>wrapper_type</literal> (<type>string</type>) -
Akımın üzerine yerleştiği protokol sarmalayıcı gerçeklenimini açıklayan
yafta. Sarmalayıcılar hakkında ayrıntılı bilgi edinmek için
<xref linkend="wrappers"/> bölümüne bakınız.
</para>
</listitem>
<listitem>
<para>
<literal>wrapper_data</literal> (<type>mixed</type>) -
Akıma ekli veriye özgü sarmalayıcı türü. Sarmalayıcılar ve sarmaladıkları
veriler hakkında ayrıntılı bilgi edinmek için
<xref linkend="wrappers"/> bölümüne bakınız.
</para>
</listitem>
<!-- {{{ needs updating when stream filters are included again
<listitem>
<para>
<literal>filters</literal> (<type>array</type>) -
Bu akım üzerinde etkili süzgeçlerin isimlerini içeren bir dizi. Süzgeçler
hakkında ayrıntılı bilgi edinmek için <xref linkend="filters"/> bölümüne
bakınız.
</para>
</listitem>
-->
<listitem>
<para>
<literal>mode</literal> (<type>string</type>) -
Akım için gereken erişim türü (<function>fopen</function> sayfasındaki
kipler tablosuna bakınız)
</para>
</listitem>
<listitem>
<para>
<literal>seekable</literal> (<type>bool</type>) -
Akım konumlanabilir türdeyse &true; olur.
</para>
</listitem>
<listitem>
<para>
<literal>uri</literal> (<type>string</type>) -
Akımla ilişkili dosya veya dosya yolu.
</para>
</listitem>
<listitem>
<para>
<literal>crypto</literal> (<type>array</type>) - Akım için TLS bağlantı
meta verisi. (Dikkat: Sadece özkaynak akımı TLS kullanıyorsa vardır.)
</para>
</listitem>
</itemizedlist>
</refsect1>
<refsect1 role="examples">
&reftitle.examples;
<para>
<example>
<title>- http'li <function>fopen</function> kullanılan
<function>stream_get_meta_data</function> örneği</title>
<programlisting role="php">
<![CDATA[
<?php
$url = 'http://www.example.com/';
if (!$fp = fopen($url, 'r')) {
trigger_error("URL ($url) açılamadı", E_USER_ERROR);
}
$meta = stream_get_meta_data($fp);
var_dump($meta);
fclose($fp);
?>
]]>
</programlisting>
&example.outputs.similar;
<screen>
<![CDATA[
array(10) {
'timed_out' =>
bool(false)
'blocked' =>
bool(true)
'eof' =>
bool(false)
'wrapper_data' =>
array(13) {
[0] =>
string(15) "HTTP/1.1 200 OK"
[1] =>
string(11) "Age: 244629"
[2] =>
string(29) "Cache-Control: max-age=604800"
[3] =>
string(38) "Content-Type: text/html; charset=UTF-8"
[4] =>
string(35) "Date: Sat, 20 Nov 2021 18:17:57 GMT"
[5] =>
string(24) "Etag: "3147526947+ident""
[6] =>
string(38) "Expires: Sat, 27 Nov 2021 18:17:57 GMT"
[7] =>
string(44) "Last-Modified: Thu, 17 Oct 2019 07:18:26 GMT"
[8] =>
string(22) "Server: ECS (chb/0286)"
[9] =>
string(21) "Vary: Accept-Encoding"
[10] =>
string(12) "X-Cache: HIT"
[11] =>
string(20) "Content-Length: 1256"
[12] =>
string(17) "Connection: close"
}
'wrapper_type' =>
string(4) "http"
'stream_type' =>
string(14) "tcp_socket/ssl"
'mode' =>
string(1) "r"
'unread_bytes' =>
int(1256)
'seekable' =>
bool(false)
'uri' =>
string(23) "http://www.example.com/"
}
]]>
</screen>
</example>
<example>
<title>- https'li <function>stream_socket_client</function> kullanılan
<function>stream_get_meta_data</function> örneği</title>
<programlisting role="php">
<![CDATA[
<?php
$streamContext = stream_context_create(
[
'ssl' => [
'capture_peer_cert' => true,
'capture_peer_cert_chain' => true,
'disable_compression' => true,
],
]
);
$client = stream_socket_client(
'ssl://www.example.com:443',
$errorNumber,
$errorDescription,
40,
STREAM_CLIENT_CONNECT,
$streamContext
);
$meta = stream_get_meta_data($client);
var_dump($meta);
?>
]]>
</programlisting>
&example.outputs.similar;
<screen>
<![CDATA[
array(8) {
'crypto' =>
array(4) {
'protocol' =>
string(7) "TLSv1.3"
'cipher_name' =>
string(22) "TLS_AES_256_GCM_SHA384"
'cipher_bits' =>
int(256)
'cipher_version' =>
string(7) "TLSv1.3"
}
'timed_out' =>
bool(false)
'blocked' =>
bool(true)
'eof' =>
bool(false)
'stream_type' =>
string(14) "tcp_socket/ssl"
'mode' =>
string(2) "r+"
'unread_bytes' =>
int(0)
'seekable' =>
bool(false)
}
]]>
</screen>
</example>
</para>
</refsect1>
<refsect1 role="notes">
&reftitle.notes;
<note>
<para>Bu işlev, <link linkend="ref.sockets">Soket eklentisi</link> ile
oluşturulan soketlerde <emphasis>çalışmaz</emphasis>.
</para>
</note>
</refsect1>
<refsect1 role="seealso">
&reftitle.seealso;
<para>
<simplelist>
<member><function>get_headers</function></member>
<member><link linkend="reserved.variables.httpresponseheader">
$http_response_header</link></member>
</simplelist>
</para>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
indent-tabs-mode:nil
sgml-parent-document:nil
sgml-default-dtd-file:"~/.phpdoc/manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->