/[cvs]/nfo/site/htdocs/netfraggle.php
ViewVC logotype

Annotation of /nfo/site/htdocs/netfraggle.php

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.4 - (hide annotations)
Mon Aug 30 02:33:26 2004 UTC (19 years, 10 months ago) by joko
Branch: MAIN
Changes since 1.3: +32 -2 lines
+ initial version of XML-RPC endpoint with method "nfo.getContent"

1 rabit 1.2 <?php
2     /*------------------------------------------------------------------------------
3     --- www.netfrag.org
4     --- NetFraggle client link page.
5     --------------------------------------------------------------------------------
6     --- rabit, 01:28 24.08.2004
7 joko 1.4 --- joko, 04:05 30.08.2004
8     --- $Id: netfraggle.php,v 1.2 2004/08/24 03:28:27 rabit Exp $
9 rabit 1.2 ------------------------------------------------------------------------------*/
10    
11 joko 1.4 include('inc/common/common.php.inc');
12 rabit 1.2
13     //------------------------------------------------------------------------------
14    
15     // ...NetFraggle interconnection code...
16 joko 1.4 // by now using XML-RPC, see API-Documentation at:
17     // http://pear.php.net/manual/en/package.webservices.xml-rpc.api.php
18    
19     $type = 'XMLRPC';
20    
21     switch ($type) {
22     case 'XMLRPC':
23     $s = new XML_RPC_Server(array(
24     "nfo.listTopics" => array("function" => "nfo_list_topics"),
25     "nfo.listContents" => array("function" => "nfo_list_contents"),
26     "nfo.getContent" => array("function" => "nfo_get_content"),
27     "nfo.listUsers" => array("function" => "nfo_list_users"),
28     ));
29     break;
30     case default:
31     break;
32     }
33    
34    
35     function nfo_list_topics() {
36     }
37     function nfo_list_contents() {
38     }
39     function nfo_get_content($ck) {
40     $content = cms_getcontent($ck);
41     return new XML_RPC_Response(new XML_RPC_Value("content", "array" | "struct"));
42     }
43     function nfo_list_users() {
44     }
45 rabit 1.2
46     //------------------------------------------------------------------------------
47    
48     ?>

MailToCvsAdmin">MailToCvsAdmin
ViewVC Help
Powered by ViewVC 1.1.26 RSS 2.0 feed