XRPC_Server – A PHP XML-RPC Server Class

XRPC_Server is a simple as possible XML-RPC server component I wrote for a project a year or two ago, and is a good alternative if you want to try to stay away from large frameworks or complex components. The component is license under the MIT License, so you’re pretty much free to do whatever you want with it. All patches are welcome! The server requires PHP5 and reflection enabled.

Usage is as simple as requiring the php-file into your "gateway" page (the URL you’ll be calling from your XML-RPC clients), and then creating the server object with the functions you want to expose as the argument to the constructor:

$server = new XRPC_Server(array(
    'multiply' => 'test_xmlrpc_multiply',
    'dateTest' => 'test_xmlrpc_date_test',
    'assoc' => 'test_xmlrpc_assoc',
    'array' => 'test_xmlrpc_array',
));

A simple file illustrating the usage is also included, XRPC_Server_Test.php.

You can see the source code of the server at XRPC_Server.phps .

The class can be downloaded from this site: XRPC_Server.tar.bz2

One thought on “XRPC_Server – A PHP XML-RPC Server Class”

  1. Hi,

    i’m working on my own cms and on my own blogscript within a pingback-service. i’ve allready found some good code-snippets for sending pings to other blogs and it works fine.

    know i was looking for a xml-rpc server to receive pings and i found yours. problem: your taz-archive isn’t working – well – i can’t download it. probably it is deleted oder the connection is wrong?

    it would be very nice if you could send me your script and an example how too use it via email. thanks a lot!

    David Querg

Leave a Reply

Your email address will not be published. Required fields are marked *