Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
MediaDBViewerAPI
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
2
Issues
2
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
BA_SI-Projekt
MediaDBViewerAPI
Commits
480aab08
Commit
480aab08
authored
Jan 11, 2016
by
Nico Schallehn
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Laufzeit fix 3
parent
a7bcb3b5
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
10 deletions
+7
-10
api.class.php
api.class.php
+4
-8
api.php
api.php
+3
-2
No files found.
api.class.php
View file @
480aab08
...
...
@@ -6,11 +6,7 @@
class
MediaDBViewerAPI
{
private
$API_KEY
;
private
$API_start_time
;
function
__construct
(){
$API_start_time
=
microtime
(
true
);
}
function
APIinit
(
$KEY
)
{
if
(
isset
(
$KEY
)
AND
strlen
(
$KEY
)
==
API_KEY_LEN
){
$API_KEY
=
$KEY
;
...
...
@@ -21,11 +17,11 @@ class MediaDBViewerAPI{
}
return
$ret
;
}
function
APIrespons
(
$respons
=
""
){
$stop
=
microtime
(
true
);
function
APIrespons
(
$
Laufzeit
=
0
,
$
respons
=
""
){
return
array
(
"API_VERSION"
=>
API_VERSION
,
"API_KEY"
=>
$API_KEY
,
"API_Laufzeit"
=>
(
$stop
-
$API_start_time
)
,
"API_Laufzeit"
=>
$Laufzeit
,
"Antwort"
=>
$respons
);
}
function
error
(
$ErrID
){
...
...
api.php
View file @
480aab08
...
...
@@ -4,7 +4,7 @@
* @author Nico Schallehn, Markus Then
*
*/
$beginn
=
microtime
(
true
);
header
(
'content-type: application/json; charset=utf-8'
);
include
'api.class.php'
;
...
...
@@ -25,5 +25,6 @@ else {
$respons
=
$API
->
error
(
1002
);
}
echo
json_encode
(
$API
->
APIrespons
(
$respons
),
JSON_PRETTY_PRINT
);
$Laufzeit
=
microtime
(
true
)
-
$beginn
;
echo
json_encode
(
$Laufzeit
,
$API
->
APIrespons
(
$respons
),
JSON_PRETTY_PRINT
);
?>
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment