My Photos

www.flickr.com
This is a Flickr badge showing public photos and videos from coogle. Make your own badge here.

Quicksearch

Improved XML-RPC extension (XMLRPCi) 1.0-beta released

Tuesday, February 15. 2005

Today I released the first public beta of XML-RPCi -- an improved XML-RPC extension for PHP 5+. Built upon the libxml2 library it supports object overloading and automatic fault handling as interfaces for XML-RPC requests.

For instance:

<?php

// Calling methods from the 'package' namespace
$package = new XMLRPC("http://pear.php.net/xmlrpc.php", "package.");

try {
$package->info("DB");
} catch (XMLRPC_Fault $fault) {
var_dump($fault);
}

?>

The basic use is as follows:

new XMLRPC($xml_rpc_url [, $optional_calling_prefix]);

Where $optional_calling_prefix is used for situations where the XML-RPC method being called contains a namespace prefix which can't be easily called from PHP. For instance, to call the 'package.info()' RPC method you can't do:

$rpc->package.info("DB");

instead you would specify the string "package." for $optional_calling_prefix and then use the method directly:

$rpc->info("DB");

Although this limits the instance of a class to calling a particular "namespace" of RPC calls, you can also call methods in other namespaces using the '__call' method:

$rpc->__call("package.info", "DB");

In the event of an error from the XML-RPC server (a fault) or a malformed response a XMLRPC_Fault will be thrown.

Feedback welcome of course, and please report any bugs to me. As the extension matures I plan on adding support for creating XML-RPC servers and backward compatiable functions from the old ext/xmlrpc extension.

Bookmark Improved XML-RPC extension (XMLRPCi) 1.0-beta released  at del.icio.us Digg Improved XML-RPC extension (XMLRPCi) 1.0-beta released Bloglines Improved XML-RPC extension (XMLRPCi) 1.0-beta released Technorati Improved XML-RPC extension (XMLRPCi) 1.0-beta released Fark this: Improved XML-RPC extension (XMLRPCi) 1.0-beta released Bookmark Improved XML-RPC extension (XMLRPCi) 1.0-beta released  at YahooMyWeb Bookmark Improved XML-RPC extension (XMLRPCi) 1.0-beta released  at Furl.net Bookmark Improved XML-RPC extension (XMLRPCi) 1.0-beta released  at reddit.com Bookmark Improved XML-RPC extension (XMLRPCi) 1.0-beta released  at blinklist.com Bookmark Improved XML-RPC extension (XMLRPCi) 1.0-beta released  at Spurl.net Bookmark Improved XML-RPC extension (XMLRPCi) 1.0-beta released  at NewsVine Bookmark Improved XML-RPC extension (XMLRPCi) 1.0-beta released  at Simpy.com Bookmark Improved XML-RPC extension (XMLRPCi) 1.0-beta released  at blogmarks Bookmark Improved XML-RPC extension (XMLRPCi) 1.0-beta released  with wists Bookmark Improved XML-RPC extension (XMLRPCi) 1.0-beta released  at Ma.gnolia.com wong it! Bookmark using any bookmark manager!

Trackbacks

No Trackbacks

Comments
Display comments as (Linear | Threaded)

No comments

The author does not allow comments to this entry