Ok smashing red, I’ve done a bit of experimentation here, I’ve lifted the XMLRPC client and server code from revolution, this was fairly simple as its just a third party library with a MODx wrapper around it. I’ve also obtained a Blogger API library that wraps the XMLRPC Client and implements the Blogger API. This is a common blogging API that allows you to add blogs, read blogs, get blog info etc.
I’ve put these in external php file under /assets/snippets, called from this snippet inside MODx :-
// Get the Blogger API
$modx_xmlrpc_path = $modx->config['base_path'] . "assets/snippets/xmlrpc/";
// Get the supported methods
$info_array = blogger_getSupportedMethods();
echo "<p>The supported XMLRPC functions on the Wordpress server are :- </p></br>";
foreach ($info_array as $method)
// Post a blog, get a blog, get user info etc. etc.
OK, this lists the supportd XMLRPC methods on the wordpress server, go here to see it in action http://bitez.hobby-site.com/index.php?id=84
or just navigate to the XMLRPC test page under the Software section of my site.
You can do whatever with this now, add blogs, read blogs, or anything that’s supported
Is this what you were after, i.e you can type some text into a MODx page, press submit, and it turns up in the blog of your choice, I’ve used Wordpress here for the demo but you can use any XMLRPC server you wish, not just for blogs either.
Coming the other way i.e MODx acting as a server is a bit harder, the security concerns already raised on this thread are very valid here, we dont want to open an attack vector into peoples installations. This would allow people using a blog client to ’publish’ to a MODx site. You would have to take say the server side implementation of the blogger api and modxify it to use your db tables etc. Authentication would also be needed, can be done but lots of work.