php-doc-en/reference/curl/functions/curl-multi-strerror.xml
Christoph Michael Becker b7f8c11e56 Generate curl methodsynopses based on stubs
Amended by cmb.

Closes GH-231.


git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@351621 c90b9560-bf6c-de11-be94-00142212c4b1
2020-11-25 00:58:58 +00:00

112 lines
2.7 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<refentry xml:id="function.curl-multi-strerror" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
<refnamediv>
<refname>curl_multi_strerror</refname>
<refpurpose>Return string describing error code</refpurpose>
</refnamediv>
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<type class="union"><type>string</type><type>null</type></type><methodname>curl_multi_strerror</methodname>
<methodparam><type>int</type><parameter>error_code</parameter></methodparam>
</methodsynopsis>
<para>
Returns a text error message describing the given CURLM error code.
</para>
</refsect1>
<refsect1 role="parameters">
&reftitle.parameters;
<variablelist>
<varlistentry>
<term><parameter>error_code</parameter></term>
<listitem>
<para>
One of the <link xlink:href="&url.curl.error;">CURLM error codes</link> constants.
</para>
</listitem>
</varlistentry>
</variablelist>
</refsect1>
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
Returns error string for valid error code, &null; otherwise.
</para>
</refsect1>
<refsect1 role="examples">
&reftitle.examples;
<para>
<example>
<title><function>curl_multi_strerror</function> example</title>
<programlisting role="php">
<![CDATA[
<?php
// Create cURL handles
$ch1 = curl_init("http://example.com"/);
$ch2 = curl_init("http://php.net/");
// Create a cURL multi handle
$mh = curl_multi_init();
// Add the handles to the multi handle
curl_multi_add_handle($mh, $ch1);
curl_multi_add_handle($mh, $ch2);
// Execute the multi handle
do {
$status = curl_multi_exec($mh, $active);
if ($active) {
curl_multi_select($mh);
}
} while ($active && $status === CURLM_OK);
// Check for errors
if ($status != CURLM_OK) {
// Display error message
echo "ERROR!\n " . curl_multi_strerror($status);
}
?>
]]>
</programlisting>
</example>
</para>
</refsect1>
<refsect1 role="seealso">
&reftitle.seealso;
<para>
<simplelist>
<member><function>curl_strerror</function></member>
<member><link xlink:href="&url.curl.error;">cURL error codes</link></member>
</simplelist>
</para>
</refsect1>
</refentry>
<!-- 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
indent-tabs-mode:nil
sgml-parent-document:nil
sgml-default-dtd-file:"~/.phpdoc/manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->