aurweb/web/html/rpc.php
eliott 5e38e3d3d0 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.
2008-01-19 23:49:35 -06:00

22 lines
451 B
PHP

<?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';
}
?>