git-interface: Add test suite and basic tests
[aur.git] / web / html / rpc.php
blob64c95622aa2ffa0b9fb5f63d315f90dc4b1ceb97
1 <?php
2 set_include_path(get_include_path() . PATH_SEPARATOR . '../lib');
3 include_once("aurjson.class.php");
5 if ( $_SERVER['REQUEST_METHOD'] != 'GET' ) {
6 header('HTTP/1.1 405 Method Not Allowed');
7 exit();
10 if ( isset($_GET['type']) ) {
11 $rpc_o = new AurJSON();
12 echo $rpc_o->handle($_GET);
14 else {
15 echo file_get_contents('../../doc/rpc.html');