From dae781d96e462a035be3640e173fe3c428c75dd3 Mon Sep 17 00:00:00 2001 From: Kelly Rauchenberger Date: Sun, 28 Sep 2008 14:04:32 +0000 Subject: Central: Completed step 3 Refs #69 --- central/trunk/xmlrpc.php | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to 'central/trunk/xmlrpc.php') diff --git a/central/trunk/xmlrpc.php b/central/trunk/xmlrpc.php index 0254e66..2713bfe 100644 --- a/central/trunk/xmlrpc.php +++ b/central/trunk/xmlrpc.php @@ -127,13 +127,27 @@ function addSubscription($username, $verification, $verificationID, $subscriptio return new xmlrpcresp(new xmlrpcval(1, "int")); } +function downloadItemModeTest() +{ + $fp = @fsockopen($_SERVER['REMOTE_ADDR'], 61200, $errno, $errstr); + if ($fp) + { + fwrite($fp, "InstaDisc Download Item Mode Test\r\n\r\n\r\n"); + fclose($fp); + return new xmlrpcresp(new xmlrpcval('0', 'int')); + } else { + return new xmlrpcresp(new xmlrpcval('1', 'int')); + } +} + $s = new xmlrpc_server( array( "InstaDisc.checkRegistration" => array("function" => "checkRegistration"), "InstaDisc.deleteItem" => array("function" => "deleteItem"), "InstaDisc.resendItem" => array("function" => "resendItem"), "InstaDisc.requestRetained" => array("function" => "requestRetained"), "InstaDisc.sendFromUpdate" => array("function" => "sendFromUpdate"), "InstaDisc.deleteSubscription" => array("function" => "deleteSubscription"), - "InstaDisc.addSubscription" => array("function" => "addSubscription") + "InstaDisc.addSubscription" => array("function" => "addSubscription"), + "InstaDisc.downloadItemModeTest" => array("function" => "downloadItemModeTest") ),0); $s->functions_parameters_type = 'phpvals'; $s->service(); -- cgit 1.4.1