PHP XML-RPC usage

Source: Internet
Author: User

XML-RPC data types

XML-RPC supports only a limited number of data types. The following are the corresponding relationships to the PHP data types:

Useful Inc.-XML-RPC implementation-PHPXMLRPC

The XML-RPC Toolkit we use is made by Useful, Inc. 's Edd dumbill, download URL http://phpxmlrpc.sourceforge.net, which includes both client and server XML-RPC implementations.

The client and server side are implemented by the Xmlrpc_client class and the Xmlrpc_server class, which are mainly used to receive and send XML-RPC messages. The Xmlrpcval class is used to encode PHP variables as XML-RPC equivalence data types and to pass parameters to a remote method. The reverse process uses the Xmlrpc_decode () function. An XML-RPC message is created using the Xmlrpcmsg class by passing it a parameter table.

The Xmlrpc_client class sends XML-RPC packets created using the Xmlrpcmsg class, and on the server side, the Xmlrpc_server class resolves these received messages as xmlrpcmsg objects. The object is then passed as a separate parameter to the user function. The function must return a Xmlrpcresp object that the Xmlrpc_server class uses to serialize and return to the client. This basic architecture is shown in the following illustration.

Installation and Configuration

In http://phpxmlrpc.sourceforge.net download, unpack, and then place Xmlrpc.inc and xmlrpcs.inc into your include path.

The client program header simply joins the following include statement:
Include (' Xmlrpc.inc ');

Server-side program header to add the following include statement:
Include (' Xmlrpc.inc ');
Include (' Xmlrpcs.inc '); Server-side code

Example

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.