diff options
Diffstat (limited to 'series/core/trunk/xmlrpc.php')
-rw-r--r-- | series/core/trunk/xmlrpc.php | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/series/core/trunk/xmlrpc.php b/series/core/trunk/xmlrpc.php new file mode 100644 index 0000000..60ada6a --- /dev/null +++ b/series/core/trunk/xmlrpc.php | |||
@@ -0,0 +1,25 @@ | |||
1 | <?php | ||
2 | |||
3 | /* InstaDisc Series - A Four Project */ | ||
4 | |||
5 | include('includes/instadisc.php'); | ||
6 | |||
7 | function subscriptionInfo($id) | ||
8 | { | ||
9 | if (!instaDisc_subscriptionExists($id)) | ||
10 | { | ||
11 | return new xmlrpcresp(new xmlrpcval('false', 'string')); | ||
12 | } | ||
13 | |||
14 | $sub = instaDisc_getSubscription($id); | ||
15 | return serialize(array( 'url' => $sub['url'], | ||
16 | 'category' => $sub['category'] | ||
17 | )); | ||
18 | } | ||
19 | |||
20 | $s = new xmlrpc_server(array( "InstaDisc.subscriptionInfo" => array('function' => 'subscriptionInfo') | ||
21 | ), 0); | ||
22 | $s->functions_parameters_type = 'phpvals'; | ||
23 | $s->service(); | ||
24 | |||
25 | ?> | ||