PHP: XML-RPC functions - Manual
PHP  
downloads | documentation | faq | getting help | mailing lists | | php.net sites | links 
search for in the  
previousxml_set_unparsed_entity_decl_handlerxmlrpc_decode_requestnext
Last updated: Fri, 30 Aug 2002
view the printer friendly version or the printer friendly version with notes or change language to English | Brazilian Portuguese | Chinese | Czech | Dutch | Finnish | French | German | Italian | Japanese | Korean | Polish | Romanian | Russian | Spanish | Swedish | Turkish

CVI. XML-RPC functions

Bevezet�s

These functions can be used to write XML-RPC servers and clients. You can find more information about XML-RPC at , and more documentation on this extension and it's functions at .

Figyelem

Ez a kiterjeszt�s K�S�RLETI JELLEGGEL M�K�DIK. Ez azt jelenti, hogy minden itt dokument�lt m�k�d�s, bele�rtve a f�ggv�nyek nev�t, m�k�d�s�t vagy b�rmi m�s, amit a kiterjeszt�s kapcs�n le�rtunk megv�ltozhat egy k�s�bbi PHP kiad�sban minden figyelmeztet�s n�lk�l. Ezt a kiterjeszt�st csak a saj�t felel�ss�gedre haszn�ld!

K�vetelm�nyek

Az itt le�rt f�ggv�nyek a standard modulban tal�lhat�ak, ami mindig rendelkez�sre �ll.

Telep�t�s

XML-RPC support in PHP is not enabled by default. You will need to use the --with-xmlrpc configuration option when compiling PHP to enable XML-RPC support. This extension is bundled into PHP as of 4.1.0.

Fut�sidej� be�ll�t�sok

Ez a kiterjeszt�s semmilyen konfigur�ci�s be�ll�t�sokat nem defini�l.

Er�forr�s t�pusok

Ez a kiterjeszt�s semmilyen er�forr�s t�pust nem defini�l.

El�re defini�lt �lland�k

Ez a kiterjeszt�s semmilyen konstans �rt�ket nem defini�l.

Tartalom
xmlrpc_decode_request -- Decodes XML into native PHP types
xmlrpc_decode -- Decodes XML into native PHP types
xmlrpc_encode_request -- Generates XML for a method request
xmlrpc_encode -- Generates XML for a PHP value
xmlrpc_get_type -- Gets xmlrpc type for a PHP value. Especially useful for base64 and datetime strings
xmlrpc_parse_method_descriptions -- Decodes XML into a list of method descriptions
xmlrpc_server_add_introspection_data -- Adds introspection documentation
xmlrpc_server_call_method -- Parses XML requests and call methods
xmlrpc_server_create -- Creates an xmlrpc server
xmlrpc_server_destroy -- Destroys server resources
xmlrpc_server_register_introspection_callback -- Register a PHP function to generate documentation
xmlrpc_server_register_method -- Register a PHP function to resource method matching method_name
xmlrpc_set_type -- Sets xmlrpc type, base64 or datetime, for a PHP string value
User Contributed Notes
XML-RPC functions
add a note about notes
[email protected]
27-Dec-2001 10:01

Refer to the below link for documentation / latest releases of the package.


[email protected]
08-Jan-2002 12:26

"Latest releases" is a bit redundant, since this extension is bundled into PHP (as of 4.1.0). You don't need to download anything from sourceforge to make this work. Just compile PHP with the --with-xmlrpc flag.

The site is useful, however, for documentation.

[email protected]
24-Apr-2002 04:05

An alternative XML-RPC implementation is available at - it's written in PHP so you can use it on servers for which you don't have the luxury of rebuilding PHP on.

nic

ivanr @ webkreator.com
21-Jun-2002 06:50

For a really easy way to use this XML-RPC extension take a look at

XML-RPC Class Server ()

It automatically creates servers out of PHP classes. Creating clients is almost as easy, especially with the recent addition of the overload extension to PHP (see ).

[email protected]
28-Jul-2002 08:33

Anyone interested in PHP-GTK talking to an XML-RPC server:


[email protected]
15-Aug-2002 03:32

This extension does not handle the process of making making XML-RPC client requests via HTTP; it only prepares the XML-RPC request payload.

This differs from many other XML-RPC implementations but offers greater flexibility, allowing SSL connections, authentication headers and XML-RPC via other transports like SMTP.

[email protected]
24-Aug-2002 08:32

There's a handy library by Keith Devens (version 2.2.1) at


Here is a sample client. It remotely calls sample.sumAndDifference
with two parameters (3 and 5).
It returns:

sum => 8
difference => -2

<?php
include ("kd_xmlrpc.php");
// define("XMLRPC_DEBUG", 0); // Set to 1 for handy debugging

$method = "sample.sumAndDifference";
$params = array(XMLRPC_prepare(3), XMLRPC_prepare(5));
$request = xmlrpc_encode_request($method,$params);

$site = "xmlrpc-c.sourceforge.net";
$location = "/api/sample.php";

list($success, $result) = XMLRPC_request( $site, $location, $method, $params );

// XMLRPC_debug_print(); // uncomment for debugging

foreach ( $result as $key => $value ) {
echo(" $key => $value \n");
}

?>

[email protected]
26-Aug-2002 05:08

Oops, two changes to the above code:

// This style is better:
// better // $params = XMLRPC_prepare(array(3,5));
// uncool // $params = array(XMLRPC_prepare(3), XMLRPC_prepare(5));

// This line is unnecessary, it can be safely removed:
// $request = xmlrpc_encode_request($method,$params);

add a note about notes
previousxml_set_unparsed_entity_decl_handlerxmlrpc_decode_requestnext
Last updated: Fri, 30 Aug 2002
show source | credits | stats | mirror sites
Copyright © 2001, 2002 The PHP Group
All rights reserved.
This mirror generously provided by:
Last updated: Wed Sep 4 00:18:56 2002 CEST