diff options
Diffstat (limited to 'web/html/rpc.php')
-rw-r--r-- | web/html/rpc.php | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/web/html/rpc.php b/web/html/rpc.php new file mode 100644 index 00000000..30813912 --- /dev/null +++ b/web/html/rpc.php @@ -0,0 +1,22 @@ +<?php + +set_include_path(get_include_path() . PATH_SEPARATOR . '../lib' . PATH_SEPARATOR . '../lang'); + +include("aur.inc"); +include("aurjson.class.php"); + +$rpc_o = new AurJSON(); +if ( $_SERVER['REQUEST_METHOD'] == 'GET' ) { + if ( isset($_GET['type']) ) { + echo $rpc_o->handle($_GET); + } + else { + echo '<html><body>'; + echo $rpc_o->usage(); + echo '</body></html>'; + } +} +else { + echo 'POST NOT SUPPORTED'; +} +?> |