mirror of
https://github.com/php/doc-it.git
synced 2026-03-24 15:42:46 +01:00
git-svn-id: https://svn.php.net/repository/phpdoc/it/trunk@351144 c90b9560-bf6c-de11-be94-00142212c4b1
129 lines
3.9 KiB
XML
129 lines
3.9 KiB
XML
<?xml version="1.0" encoding="UTF-8"?>
|
|
<!-- EN-Revision: 96c9d88bad9a7d7d44bfb7f26c226df7ee9ddf26 Maintainer: pastore Status: ready -->
|
|
<!-- CREDITS: curcio_it -->
|
|
<refentry xml:id="function.xmlrpc-encode-request" xmlns="http://docbook.org/ns/docbook">
|
|
<refnamediv>
|
|
<refname>xmlrpc_encode_request</refname>
|
|
<refpurpose>Genera XML per un metodo di richiesta</refpurpose>
|
|
</refnamediv>
|
|
<refsect1 role="description">
|
|
&reftitle.description;
|
|
<methodsynopsis>
|
|
<type>string</type><methodname>xmlrpc_encode_request</methodname>
|
|
<methodparam><type>string</type><parameter>method</parameter></methodparam>
|
|
<methodparam><type>mixed</type><parameter>params</parameter></methodparam>
|
|
<methodparam choice="opt"><type>array</type><parameter>output_options</parameter></methodparam>
|
|
</methodsynopsis>
|
|
&warn.experimental.func;
|
|
</refsect1>
|
|
|
|
<refsect1 role="parameters">
|
|
&reftitle.parameters;
|
|
<para>
|
|
<variablelist>
|
|
<varlistentry>
|
|
<term><parameter>method</parameter></term>
|
|
<listitem>
|
|
<para>
|
|
Nome del metodo da chiamare.
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry>
|
|
<term><parameter>params</parameter></term>
|
|
<listitem>
|
|
<para>
|
|
I parametri del metodo compatibili con la firma del metodo.
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry>
|
|
<term><parameter>output_options</parameter></term>
|
|
<listitem>
|
|
<para>
|
|
Le opzioni di output specifiche dell'array possono contenere (i valori predefiniti sono
|
|
evidenziati):
|
|
<itemizedlist>
|
|
<listitem><para>output_type: php, <emphasis>xml</emphasis></para></listitem>
|
|
<listitem><para>verbosity: no_white_space, newlines_only, <emphasis>pretty</emphasis></para></listitem>
|
|
<listitem><para>escaping: cdata, <emphasis>non-ascii, non-print, markup</emphasis>
|
|
(può essere una stringa con un valore o un array con valori multipli)</para></listitem>
|
|
<listitem><para>version: simple, <emphasis>xmlrpc</emphasis>, soap 1.1, auto</para></listitem>
|
|
<listitem><para>encoding: <emphasis>iso-8859-1</emphasis>, altri set di caratteri supportati da iconv</para></listitem>
|
|
</itemizedlist>
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
</variablelist>
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="returnvalues">
|
|
&reftitle.returnvalues;
|
|
<para>
|
|
Restituisce una stringa contenente la rappresentazione XML della richiesta.
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="examples">
|
|
&reftitle.examples;
|
|
<para>
|
|
<example>
|
|
<title>Esempio delle funzioni client di XMLRPC</title>
|
|
<programlisting role="php">
|
|
<![CDATA[
|
|
<?php
|
|
$request = xmlrpc_encode_request("method", array(1, 2, 3));
|
|
$context = stream_context_create(array('http' => array(
|
|
'method' => "POST",
|
|
'header' => "Content-Type: text/xml",
|
|
'content' => $request
|
|
)));
|
|
$file = file_get_contents("http://www.example.com/xmlrpc", false, $context);
|
|
$response = xmlrpc_decode($file);
|
|
if ($response && xmlrpc_is_fault($response)) {
|
|
trigger_error("xmlrpc: $response[faultString] ($response[faultCode])");
|
|
} else {
|
|
print_r($response);
|
|
}
|
|
?>
|
|
]]>
|
|
</programlisting>
|
|
</example>
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="seealso">
|
|
&reftitle.seealso;
|
|
<para>
|
|
<simplelist>
|
|
<member><function>stream_context_create</function></member>
|
|
<member><function>file_get_contents</function></member>
|
|
<member><function>xmlrpc_decode</function></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
|
|
-->
|