diff options
author | eliott <eliott@cactuswax.net> | 2007-10-12 21:05:13 -0700 |
---|---|---|
committer | Dan McGee <dan@archlinux.org> | 2008-01-19 23:49:35 -0600 |
commit | 5e38e3d3d0eff20f8d46bad67c4944a6a1d92ea4 (patch) | |
tree | c23cb38182971c201a4f797bcf3f8fde43787be8 /web/html | |
parent | 0cda12132d5b28b3a10a27bcad56bc823116817b (diff) | |
download | aurweb-5e38e3d3d0eff20f8d46bad67c4944a6a1d92ea4.tar.xz |
Added AurJSON code.
Added a JSON interface to the aur. This should make it easier for developers to integrate
command line utilities and poll against the AUR itself.
Diffstat (limited to 'web/html')
-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 0000000..3081391 --- /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'; +} +?> |