Skip to content

Commit

Permalink
curl-init.xml: replace 'resource' to 'session' (#3623)
Browse files Browse the repository at this point in the history
  • Loading branch information
mmalferov authored Nov 8, 2024
1 parent 3d6879b commit 61f6578
Showing 1 changed file with 8 additions and 12 deletions.
20 changes: 8 additions & 12 deletions reference/curl/functions/curl-init.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,15 @@
<refname>curl_init</refname>
<refpurpose>Initialize a cURL session</refpurpose>
</refnamediv>

<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<type class="union"><type>CurlHandle</type><type>false</type></type><methodname>curl_init</methodname>
<methodparam choice="opt"><type class="union"><type>string</type><type>null</type></type><parameter>url</parameter><initializer>&null;</initializer></methodparam>
</methodsynopsis>
<para>
Initializes a new session and return a cURL handle for use with the
<function>curl_setopt</function>, <function>curl_exec</function>,
and <function>curl_close</function> functions.
Initializes a new session and returns a cURL handle.
</para>
</refsect1>

Expand All @@ -28,7 +26,7 @@
<listitem>
<para>
If provided, the <constant>CURLOPT_URL</constant> option will be set
to its value. You can manually set this using the
to its value. This can be set manually using the
<function>curl_setopt</function> function.
</para>
<note>
Expand All @@ -49,7 +47,7 @@
Returns a cURL handle on success, &false; on errors.
</para>
</refsect1>

<refsect1 role="changelog">
&reftitle.changelog;
<informaltable>
Expand Down Expand Up @@ -89,18 +87,17 @@
<programlisting role="php">
<![CDATA[
<?php
// create a new cURL resource
// Initializes a new cURL session
$ch = curl_init();
// set URL and other appropriate options
// Set URL and other appropriate options
curl_setopt($ch, CURLOPT_URL, "http://www.example.com/");
curl_setopt($ch, CURLOPT_HEADER, 0);
// grab URL and pass it to the browser
// Grab URL and pass it to the browser
curl_exec($ch);
// close cURL resource, and free up system resources
curl_close($ch);
?>
]]>
</programlisting>
Expand All @@ -112,7 +109,6 @@ curl_close($ch);
&reftitle.seealso;
<para>
<simplelist>
<member><function>curl_close</function></member>
<member><function>curl_multi_init</function></member>
</simplelist>
</para>
Expand Down

0 comments on commit 61f6578

Please sign in to comment.