<?php
-// $Id$
-include_once "includes/xmlrpcs.inc";
-include_once "includes/bootstrap.inc";
-include_once "includes/common.inc";
+/**
+ * @file
+ * PHP page for handling incoming XML-RPC requests from clients.
+ */
-$functions = module_invoke_all("xmlrpc");
+/**
+ * Root directory of Drupal installation.
+ */
+define('DRUPAL_ROOT', getcwd());
-$server = new xmlrpc_server($functions);
+include_once DRUPAL_ROOT . '/includes/bootstrap.inc';
+drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL);
+include_once DRUPAL_ROOT . '/includes/xmlrpc.inc';
+include_once DRUPAL_ROOT . '/includes/xmlrpcs.inc';
-?>
+xmlrpc_server(module_invoke_all('xmlrpc'));