Working with XML-RPC in PHP

XML-RPC is a very straightforward and effective data transport mechanism. Requests and responses are formatted in a common way. Clients and service providers can easily implement this simple protocol. PHP has a group of XML-RPC functions that are made for working with XML-RPC data.

PHP's XML-RPC functions are documented at: PHP: XML-RPC Functions - Manual. The collection is small but invaluable. They can be grouped into functions that enable PHP applications to be XML-RPC clients, or functions that create PHP-powered XML-RPC services. These functions are available, if PHP was compiled with the –with-xmlrpc option.

To make your mashup, you need to know how to create an XML-RPC request, how to call the service, and how to process the return data. We will focus our attention on three PHP functions that will help us do this: xmlrpc_encode_request to convert our PHP variables into XML-RPC format, xmlrpc_decode does the reverse, and xmlrpc_is_fault checks to see if there was an error with our request to the server

Replies

You are reading an archived discussion.

Related Posts

Around a year back, due to some "compulsory attendance" drag I had to attain an outreach program in a village school. The main idea of the program was to teach...
how can we create wifi sharing page for store example just like we use in use in cafe teria like domios will get otp for login wifi and after some...
Dear all, kindaly suggest me, if a person get placed in his/her campus placement in wipro. But due to some reason they couln't sent their document till final intimation by...
Panasonic India has announced the launch of its amazing action camera Panasonic HX-A1 at an unbelievable price of Rs. 19,990. The camera does a lot of stuff that you want...
Born in a small town in Uttar Pradesh and brought up in Delhi, Avi Jain belongs to a traditional business family, where everyone has started something of their own. After...