File: RPC2.php

package info (click to toggle)
phpwiki 1.3.14-3
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 15,716 kB
  • ctags: 23,548
  • sloc: php: 88,295; sql: 1,476; sh: 1,378; perl: 765; makefile: 602; awk: 28
file content (41 lines) | stat: -rwxr-xr-x 1,168 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
<?php 
// $Id: RPC2.php,v 1.7 2007/02/17 14:14:27 rurban Exp $
/*
 * The guts of this code have been moved to lib/XmlRpcServer.php.
 *
 * This file is really a vestige, as now, you can direct XML-RPC
 * request to the main wiki URL (e.g. index.php) --- it will
 * notice that you've POSTed content-type of text/xml and
 * fire up the XML-RPC server automatically.
 */

// Intercept GET requests from confused users.  Only POST is allowed here!
if (empty($GLOBALS['HTTP_SERVER_VARS']))
    $GLOBALS['HTTP_SERVER_VARS']  =& $_SERVER;
if ($HTTP_SERVER_VARS['REQUEST_METHOD'] != "POST")  
{
    die('This is the address of the XML-RPC interface.' .
        '  You must use XML-RPC calls to access information here.');
}

// Constant defined to indicate to phpwiki that it is being accessed via XML-RPC
define ("WIKI_XMLRPC", true);

// Start up the main code
include_once("index.php");
include_once("lib/main.php");

include_once("lib/XmlRpcServer.php");

$server = new XmlRpcServer;
$server->service();

// (c-file-style: "gnu")
// Local Variables:
// mode: php
// tab-width: 8
// c-basic-offset: 4
// c-hanging-comment-ender-p: nil
// indent-tabs-mode: nil
// End:   
?>