Commit a90e549a authored by Nico Schallehn's avatar Nico Schallehn

serverinfo

parent bf73f011
......@@ -17,7 +17,13 @@ class MediaDBViewerAPI{
}
return $ret;
}
function API_serverinfo(){
return array( "time" => time(),
"HTTP_USER_AGENT" => $_SERVER['HTTP_USER_AGENT'],
"REMOTE_ADDR" => $_SERVER['REMOTE_ADDR']
);
}
function APIrespons($Laufzeit = 0, $respons = ""){
return array( "API_VERSION"=> API_VERSION,
"API_KEY"=>$this->API_KEY,
......
......@@ -19,7 +19,8 @@ $API = new MediaDBViewerAPI();
if($API->APIinit($_GET['KEY'])){
if(method_exists('MediaDBViewerAPI', 'API_'.$_GET['action'])){
$respons = $API->error(1001);
$funktionsname= 'API_'.$_GET['action'];
$respons = $API->$funktionsname();
}
else{
$respons = $API->error(1003);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment