language/context/curl.xml
2e39b215fe0d147c5dce83c0e4216552747eb5ff
...
...
@@ -1,215 +0,0 @@
1
-
<?xml version="1.0" encoding="utf-8"?>
2
-
<!-- $Revision$ -->
3
-

4
-
<refentry xml:id="context.curl" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" role="noversion">
5
-
<refnamediv>
6
-
<refname>CURL context options</refname>
7
-
<refpurpose>CURL context option listing</refpurpose>
8
-
</refnamediv>
9
-
10
-
<refsect1 role="description">
11
-
&reftitle.description;
12
-
<para>
13
-
CURL context options are available when the
14
-
<link linkend="intro.curl">CURL</link> extension was compiled using the
15
-
<option>--with-curlwrappers</option> configure option.
16
-
</para>
17
-
</refsect1>
18
-

19
-
<refsect1 role="options"><!-- {{{ -->
20
-
&reftitle.options;
21
-
<para>
22
-
<variablelist>
23
-
<varlistentry xml:id="context.curl.method">
24
-
<term>
25
-
<parameter>method</parameter>
26
-
<type>string</type>
27
-
</term>
28
-
<listitem>
29
-
<para>
30
-
<constant>GET</constant>, <constant>POST</constant>, or
31
-
any other HTTP method supported by the remote server.
32
-
</para>
33
-
<para>
34
-
Defaults to <constant>GET</constant>.
35
-
</para>
36
-
</listitem>
37
-
</varlistentry>
38
-
<varlistentry xml:id="context.curl.header">
39
-
<term>
40
-
<parameter>header</parameter>
41
-
<type>string</type>
42
-
</term>
43
-
<listitem>
44
-
<para>
45
-
Additional headers to be sent during request. Values
46
-
in this option will override other values (such as
47
-
<literal>User-agent:</literal>, <literal>Host:</literal>,
48
-
and <literal>Authentication:</literal>).
49
-
</para>
50
-
</listitem>
51
-
</varlistentry>
52
-
<varlistentry xml:id="context.curl.user-agent">
53
-
<term>
54
-
<parameter>user_agent</parameter>
55
-
<type>string</type>
56
-
</term>
57
-
<listitem>
58
-
<para>
59
-
Value to send with User-Agent: header.
60
-
</para>
61
-
<para>
62
-
By default the
63
-
<link linkend="ini.user-agent">user_agent</link>
64
-
&php.ini; setting is used.
65
-
</para>
66
-
</listitem>
67
-
</varlistentry>
68
-
<varlistentry xml:id="context.curl.content">
69
-
<term>
70
-
<parameter>content</parameter>
71
-
<type>string</type>
72
-
</term>
73
-
<listitem>
74
-
<para>
75
-
Additional data to be sent after the headers. This option is not used
76
-
for <constant>GET</constant> or <constant>HEAD</constant> requests.
77
-
</para>
78
-
</listitem>
79
-
</varlistentry>
80
-
<varlistentry xml:id="context.curl.proxy">
81
-
<term>
82
-
<parameter>proxy</parameter>
83
-
<type>string</type>
84
-
</term>
85
-
<listitem>
86
-
<para>
87
-
URI specifying address of proxy server. (e.g.
88
-
<literal>tcp://proxy.example.com:5100</literal>).
89
-
</para>
90
-
</listitem>
91
-
</varlistentry>
92
-
<varlistentry xml:id="context.curl.max-redirects">
93
-
<term>
94
-
<parameter>max_redirects</parameter>
95
-
<type>integer</type>
96
-
</term>
97
-
<listitem>
98
-
<para>
99
-
The max number of redirects to follow. Value <literal>1</literal> or
100
-
less means that no redirects are followed.
101
-
</para>
102
-
<para>
103
-
Defaults to <literal>20</literal>.
104
-
</para>
105
-
</listitem>
106
-
</varlistentry>
107
-
<varlistentry xml:id="context.curl.curl-verify-ssl-host">
108
-
<term>
109
-
<parameter>curl_verify_ssl_host</parameter>
110
-
<type>boolean</type>
111
-
</term>
112
-
<listitem>
113
-
<para>
114
-
Verify the host.
115
-
</para>
116
-
<para>
117
-
Defaults to &false;
118
-
</para>
119
-
<note>
120
-
<para>
121
-
This option is available for both the http and ftp protocol wrappers.
122
-
</para>
123
-
</note>
124
-
</listitem>
125
-
</varlistentry>
126
-
<varlistentry xml:id="context.curl.curl-verify-ssl-peer">
127
-
<term>
128
-
<parameter>curl_verify_ssl_peer</parameter>
129
-
<type>boolean</type>
130
-
</term>
131
-
<listitem>
132
-
<para>
133
-
Require verification of SSL certificate used.
134
-
</para>
135
-
<para>
136
-
Defaults to &false;
137
-
</para>
138
-
<note>
139
-
<para>
140
-
This option is available for both the http and ftp protocol wrappers.
141
-
</para>
142
-
</note>
143
-
</listitem>
144
-
</varlistentry>
145
-
</variablelist>
146
-
</para>
147
-
</refsect1><!-- }}} -->
148
-
149
-
<refsect1 role="examples"><!-- {{{ -->
150
-
&reftitle.examples;
151
-
<para>
152
-
<example xml:id="context.curl.example-post"><!-- {{{ -->
153
-
<title>Fetch a page and send POST data</title>
154
-
<programlisting role="php">
155
-
<![CDATA[
156
-
<?php
157
-

158
-
$postdata = http_build_query(
159
-
array(
160
-
'var1' => 'some content',
161
-
'var2' => 'doh'
162
-
)
163
-
);
164
-

165
-
$opts = array('http' =>
166
-
array(
167
-
'method' => 'POST',
168
-
'header' => 'Content-type: application/x-www-form-urlencoded',
169
-
'content' => $postdata
170
-
)
171
-
);
172
-

173
-
$context = stream_context_create($opts);
174
-

175
-
$result = file_get_contents('http://example.com/submit.php', false, $context);
176
-

177
-
?>
178
-
]]>
179
-
</programlisting>
180
-
</example><!-- }}} -->
181
-
</para>
182
-
</refsect1><!-- }}} -->
183
-

184
-
<refsect1 role="seealso">
185
-
&reftitle.seealso;
186
-
<para>
187
-
<simplelist>
188
-
<member><xref linkend="context.socket" /></member>
189
-
</simplelist>
190
-
</para>
191
-
</refsect1>
192
-

193
-
</refentry>
194
-
195
-
<!-- Keep this comment at the end of the file
196
-
Local variables:
197
-
mode: sgml
198
-
sgml-omittag:t
199
-
sgml-shorttag:t
200
-
sgml-minimize-attributes:nil
201
-
sgml-always-quote-attributes:t
202
-
sgml-indent-step:1
203
-
sgml-indent-data:t
204
-
indent-tabs-mode:nil
205
-
sgml-parent-document:nil
206
-
sgml-default-dtd-file:"~/.phpdoc/manual.ced"
207
-
sgml-exposed-tags:nil
208
-
sgml-local-catalogs:nil
209
-
sgml-local-ecat-files:nil
210
-
End:
211
-
vim600: syn=xml fen fdm=syntax fdl=2 si
212
-
vim: et tw=78 syn=sgml
213
-
vi: ts=1 sw=1
214
-
-->
215
-

216
0