reference/curl/functions/curl-setopt-array.xml
184f3f7bd45643cb80f828d0bb001991ec3a5fad
...
...
@@ -9,7 +9,7 @@
9
9
&reftitle.description;
10
10
<methodsynopsis>
11
11
<type>bool</type><methodname>curl_setopt_array</methodname>
12
-
<methodparam><type>resource</type><parameter>ch</parameter></methodparam>
12
+
<methodparam><type>CurlHandle</type><parameter>handle</parameter></methodparam>
13
13
<methodparam><type>array</type><parameter>options</parameter></methodparam>
14
14
</methodsynopsis>
15
15
<para>
...
...
@@ -47,6 +47,23 @@
47
47
</para>
48
48
</refsect1>
49
49

50
+
<refsect1 role="changelog">
51
+
&reftitle.changelog;
52
+
<informaltable>
53
+
<tgroup cols="2">
54
+
<thead>
55
+
<row>
56
+
<entry>&Version;</entry>
57
+
<entry>&Description;</entry>
58
+
</row>
59
+
</thead>
60
+
<tbody>
61
+
&curl.changelog.handle-param;
62
+
</tbody>
63
+
</tgroup>
64
+
</informaltable>
65
+
</refsect1>
66
+

50
67
<refsect1 role="examples">
51
68
&reftitle.examples;
52
69
<para>
...
...
@@ -77,31 +94,6 @@ curl_close($ch);
77
94
</programlisting>
78
95
</example>
79
96
</para>
80
-
<para>
81
-
Prior to PHP 5.1.3 this function can be simulated with:
82
-
</para>
83
-
<para>
84
-
<example>
85
-
<title>Our own implementation of <function>curl_setopt_array</function></title>
86
-
<programlisting role="php">
87
-
<![CDATA[
88
-
<?php
89
-
if (!function_exists('curl_setopt_array')) {
90
-
function curl_setopt_array(&$ch, $curl_options)
91
-
{
92
-
foreach ($curl_options as $option => $value) {
93
-
if (!curl_setopt($ch, $option, $value)) {
94
-
return false;
95
-
}
96
-
}
97
-
return true;
98
-
}
99
-
}
100
-
?>
101
-
]]>
102
-
</programlisting>
103
-
</example>
104
-
</para>
105
97
</refsect1>
106
98

107
99
<refsect1 role="notes">
...
...
@@ -126,7 +118,6 @@ if (!function_exists('curl_setopt_array')) {
126
118
</para>
127
119
</refsect1>
128
120
</refentry>
129
-

130
121
<!-- Keep this comment at the end of the file
131
122
Local variables:
132
123
mode: sgml
133
124