summaryrefslogtreecommitdiff
path: root/xmlrpc.php
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2001-09-09 16:47:10 +0000
committerDries Buytaert <dries@buytaert.net>2001-09-09 16:47:10 +0000
commit1b7510eebf0da114677408674e552201ff0711c9 (patch)
treeac4cf9a2a598a901a09843b910af838479b26145 /xmlrpc.php
parent8df2ec0e21f5a0fcb4d58b0729c01a86424abd67 (diff)
downloadbrdo-1b7510eebf0da114677408674e552201ff0711c9.tar.gz
brdo-1b7510eebf0da114677408674e552201ff0711c9.tar.bz2
- Added an XML-RPC server. Modules that want to export remote procedure
calls can implement the new 'xmlrpc' hook. Example: function mymodule_xmlrpc() { return array("drupal.myfunction" => array("function" => "mymodule_myfunction")); }
Diffstat (limited to 'xmlrpc.php')
-rw-r--r--xmlrpc.php16
1 files changed, 16 insertions, 0 deletions
diff --git a/xmlrpc.php b/xmlrpc.php
new file mode 100644
index 000000000..7bc237d40
--- /dev/null
+++ b/xmlrpc.php
@@ -0,0 +1,16 @@
+<?php
+
+include_once("includes/xmlrpcs.inc");
+include_once "includes/common.inc";
+
+$functions = array();
+
+foreach (module_list() as $name) {
+ if (module_hook($name, "xmlrpc")) {
+ $functions = array_merge($functions, module_invoke($name, "xmlrpc"));
+ }
+}
+
+$server = new xmlrpc_server($functions);
+
+?>