summaryrefslogtreecommitdiffstats
path: root/web/html/rpc.php
blob: 30813912fe33d0ce28e3e18dfc592306830e4b52 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
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';
}
?>