From 44c3bc48b5db7b3dc6517d2b073a55af5d4b52db Mon Sep 17 00:00:00 2001 From: Kelly Rauchenberger Date: Wed, 10 Sep 2008 21:06:49 +0000 Subject: Series: Moved around directory structure Refs #55 --- series/trunk/xmlrpc.php | 44 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 series/trunk/xmlrpc.php (limited to 'series/trunk/xmlrpc.php') diff --git a/series/trunk/xmlrpc.php b/series/trunk/xmlrpc.php new file mode 100644 index 0000000..01664ad --- /dev/null +++ b/series/trunk/xmlrpc.php @@ -0,0 +1,44 @@ + $sub['url'], + 'category' => $sub['category'] + )); +} + +function getPasswordInfo($id) +{ + if (!instaDisc_subscriptionExists($id)) + { + return new xmlrpcresp(new xmlrpcval('false', 'string')); + } + + $sub = instaDisc_getSubscription($id); + if ($sub['password'] == '') + { + return new xmlrpcresp(new xmlrpcval('false', 'string')); + } else { + $verID = rand(1,2147483647); + + return new xmlrpcresp(new xmlrpcval(md5($sub['password'] . ':' . $verID) . ':' . $verID, 'string')); + } +} + +$s = new xmlrpc_server(array( "InstaDisc.subscriptionInfo" => array('function' => 'subscriptionInfo'), + "InstaDisc.getPasswordInfo" => array('function' => 'getPasswordInfo') + ), 0); +$s->functions_parameters_type = 'phpvals'; +$s->service(); + +?> -- cgit 1.4.1