Skip to content

Commit 61f6578

Browse files
authored
curl-init.xml: replace 'resource' to 'session' (#3623)
1 parent 3d6879b commit 61f6578

File tree

1 file changed

+8
-12
lines changed

1 file changed

+8
-12
lines changed

reference/curl/functions/curl-init.xml

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,15 @@
55
<refname>curl_init</refname>
66
<refpurpose>Initialize a cURL session</refpurpose>
77
</refnamediv>
8-
8+
99
<refsect1 role="description">
1010
&reftitle.description;
1111
<methodsynopsis>
1212
<type class="union"><type>CurlHandle</type><type>false</type></type><methodname>curl_init</methodname>
1313
<methodparam choice="opt"><type class="union"><type>string</type><type>null</type></type><parameter>url</parameter><initializer>&null;</initializer></methodparam>
1414
</methodsynopsis>
1515
<para>
16-
Initializes a new session and return a cURL handle for use with the
17-
<function>curl_setopt</function>, <function>curl_exec</function>,
18-
and <function>curl_close</function> functions.
16+
Initializes a new session and returns a cURL handle.
1917
</para>
2018
</refsect1>
2119

@@ -28,7 +26,7 @@
2826
<listitem>
2927
<para>
3028
If provided, the <constant>CURLOPT_URL</constant> option will be set
31-
to its value. You can manually set this using the
29+
to its value. This can be set manually using the
3230
<function>curl_setopt</function> function.
3331
</para>
3432
<note>
@@ -49,7 +47,7 @@
4947
Returns a cURL handle on success, &false; on errors.
5048
</para>
5149
</refsect1>
52-
50+
5351
<refsect1 role="changelog">
5452
&reftitle.changelog;
5553
<informaltable>
@@ -89,18 +87,17 @@
8987
<programlisting role="php">
9088
<![CDATA[
9189
<?php
92-
// create a new cURL resource
90+
91+
// Initializes a new cURL session
9392
$ch = curl_init();
9493
95-
// set URL and other appropriate options
94+
// Set URL and other appropriate options
9695
curl_setopt($ch, CURLOPT_URL, "http://www.example.com/");
9796
curl_setopt($ch, CURLOPT_HEADER, 0);
9897
99-
// grab URL and pass it to the browser
98+
// Grab URL and pass it to the browser
10099
curl_exec($ch);
101100
102-
// close cURL resource, and free up system resources
103-
curl_close($ch);
104101
?>
105102
]]>
106103
</programlisting>
@@ -112,7 +109,6 @@ curl_close($ch);
112109
&reftitle.seealso;
113110
<para>
114111
<simplelist>
115-
<member><function>curl_close</function></member>
116112
<member><function>curl_multi_init</function></member>
117113
</simplelist>
118114
</para>

0 commit comments

Comments
 (0)