php-doc-en/functions/curl.xml

130 lines
3.7 KiB
XML
Raw Normal View History

<reference id="ref.curl">
<title>CURL Client URL Library Functions</title>
<titleabbrev>CURL</titleabbrev>
<partintro>
<simpara>
The CURL module is currently experimental and incomplete. Do
not rely on it.
</simpara>
<simpara>
In order to use the CURL functions you need to install the <ulink
url="&url.curl;">CURL</ulink> package. PHP requires that you use
the 7.0.2-beta version. Version 6.5.2 will not do.
</simpara>
<simpara>
As this documentation is currently as incomplete and
experimental as the module itself, you should rely on the
CURL C-API documentation for a list of option names and
additional information.
</simpara>
</partintro>
<refentry id="function.curl-init">
<refnamediv>
<refname>curl_init</refname>
<refpurpose>Initialize a CURL session</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<funcsynopsis>
<funcprototype>
<funcdef>int <function>curl_init</function></funcdef>
<paramdef>string <parameter>curl</parameter></paramdef>
</funcprototype>
</funcsynopsis>
<para>
This function must be the first function to call, and it returns
a CURL handle that you shall use as input to the other
curl-functions. The init calls intializes curl.
</para>
<para>
If this function returns false, something went wrong and you
cannot use the other curl functions.
</para>
</refsect1>
</refentry>
<refentry id="function.curl-setopt">
<refnamediv>
<refname>curl_setopt</refname>
<refpurpose>Set an option for a CURL transfer</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<funcsynopsis>
<funcprototype>
<funcdef>bool <function>curl_setopt</function></funcdef>
<paramdef>int <parameter>ch</parameter></paramdef>
<paramdef>string <parameter>option</parameter></paramdef>
<paramdef>mixed <parameter>value</parameter></paramdef>
</funcprototype>
</funcsynopsis>
<para>
TODO
</para>
</refsect1>
</refentry>
<refentry id="function.curl-exec">
<refnamediv>
<refname>curl_exec</refname>
<refpurpose>Perform a CURL session</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<funcsynopsis>
<funcprototype>
<funcdef>bool <function>curl_exec</function></funcdef>
<paramdef>int <parameter>ch</parameter></paramdef>
</funcprototype>
</funcsynopsis>
<para>
This function is called after the init and all the
<function>curl_easy_setopt</funtion> calls are made, and will
perform the transfer as described in the options. It must be
called with the same handle as input as the
<function>curl_easy_init</function> call returned.
</para>
</refsect1>
</refentry>
<refentry id="function.curl-close">
<refnamediv>
<refname>curl_close</refname>
<refpurpose>Close a CURL session</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<funcsynopsis>
<funcprototype>
<funcdef>void <function>curl_close</function></funcdef>
<paramdef>int <parameter>ch</parameter></paramdef>
</funcprototype>
</funcsynopsis>
<para>
This functions closes a CURL session and frees all ressources.
The CURL handle <parameter>ch</parameter> becomes invalid.
</para>
</refsect1>
</refentry>
</reference>
<!-- 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
sgml-parent-document:nil
sgml-default-dtd-file:"../../manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
-->