Abstract XmlRpc Server

Released 6 years ago , Last update 6 years ago

Create an XML-RPC server inside any PHP project with a one-liner! automatically generates client class as well.

With Abstract Xml-Rpc Server class you will be able to create a server inside any PHP project with just one line of code.

In addition to having an XML-RPC server up with 1 line of code, you will also get a fully functional XML-RPC client class automatically. Client class will be generated when you visit the XML-RPC server URL endpoint with an additional ?client parameter in the URL.

Check out the example below to see how easy to use it really is.

Pricing

14 day 14-day money-back guarantee

FREE

Personal License

  • Perpetual license

  • 1 site, unlimited servers

  • No distribution (hosted use only)

  • Non-commercial use

  • Attribution required

Example

Lets say we have created a file called server.php which can be accessed on the URL http://example.com/server.php

This is what server.php looks like:

/* On this page we will create xmlrpc server from class Test */
require_once("abstractxmlrpcserver.class.php");

/* first define class, ofcorse it can be defined anywhere */
class Test {
    public static function run() { print "Works\n"; }
    private function example() { print "I'm private and should not be in xmlrpc server.\n"; }
    public function bob() { print "Hey! My name is Bob."; }
}
/* now we will create instance of class Test */
$test = new Test();

/* and finaly create xmlrpc server */
AbstractXmlRpcServer::createServer($test /*instance of Test class*/);
/* DONE! */
/* if you visit this url with added ?client at the end
for example http://example.com/primer.php?client
you will get full client php class which can be used
to access this xmlrpc server */

If we were to visit http://example.com/server.php?client we would get fully functional client XML-RPC class. This is the on-page response we would get from visiting mentioned URL:

class TestXMLRPCClient extends AbstractXMLRPCClient {
    public function run() {
        $params = array();
        return $this->sendRequest("run", $params);
    }

    public function bob() {
        $params = array();
        return $this->sendRequest("bob", $params);
    }
}

Notice how only public and static methods are exposed - private / protected methods will not be accessible through the XML-RPC server endpoint.

2 licenses, starting from From » FREE View Licenses

Get A Quote

What do you need?
  • Custom development
  • Integration
  • Customization / Reskinning
  • Consultation
When do you need it?
  • Soon
  • Next week
  • Next month
  • Anytime

Thanks for getting in touch!

Your quote details have been received and we'll get back to you soon.


Or enter your name and Email
No comments have been posted yet.