Example #1
0
<?php

// $Id: xmlrpc.php,v 1.19 2009-12-13 13:06:45 dries Exp $
/**
 * @file
 * PHP page for handling incoming XML-RPC requests from clients.
 */
/**
 * Root directory of Drupal installation.
 */
define('DRUPAL_ROOT', getcwd());
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';
$services = module_invoke_all('xmlrpc');
drupal_alter('xmlrpc', $services);
xmlrpc_server($services);
Example #2
0
<?php

/**
 * @file
 * PHP page for handling incoming XML-RPC requests from clients.
 */
/**
 * Root directory of Drupal installation.
 */
define('DRUPAL_ROOT', getcwd());
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'));
Example #3
0
if (!function_exists("xmlrpc")) {
    include "plugins/lib/xmlrpc.php";
}
if (!function_exists("phprpc")) {
    include "plugins/lib/phprpc.php";
}
if (!function_exists("ewiki_sync_local")) {
    include "plugins/lib/sync.php";
}
#-- serve XML-RPC and PHP-RPC requests
header("X-WikiSync: " . WIKISYNC_VER);
$ewiki_config["ua"] .= " WikiSync/" . WIKISYNC_VER;
if ($_SERVER["REQUEST_METHOD"] != "GET") {
    $phprpc_methods = $xmlrpc_methods = array("ewiki_db" => "ewiki_db", "ewiki.sync" => "ewiki_sync_local");
    phprpc_server();
    xmlrpc_server();
    die("Request Missed.");
}
#-- start
$action = $_REQUEST["action"];
$proto = $_REQUEST["proto"];
$url = $_REQUEST["url"];
if ($url) {
    // save as preference
    setcookie("last_sync_url", $url, time() + 90 * 24 * 60 * 60, dirname($_SERVER["REQUEST_URI"]));
}
?>
<html>
<head>
 <title>syncing with remote wiki database</title>
 <link rel="stylesheet" type="text/css" href="t_config.css">