source: webapp/webservice/index.php@ d7e6e9c

0.5 app-cordova debian/bullseye debian/jessie
Last change on this file since d7e6e9c was d7e6e9c, checked in by Joachim Langenbach <joachim.langenbach@…>, 10 years ago
  • Added webservice file to return displayed data (currently random generated)
    • Load the displayed data from webservice using JQuery
    • Added license statements

Signed-off-by: Joachim Langenbach <joachim.langenbach@…>

  • Property mode set to 100644
File size: 1.0 KB
Line 
1<?php
2/*
3 Copyright (C) 2016 EngSaS - Engineering Solutions and Services Langenbach. All rights reserved.
4
5 This program is free software: you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation, either version 3 of the License, or
8 (at your option) any later version.
9
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
14
15 You should have received a copy of the GNU General Public License
16 along with this program. If not, see <http://www.gnu.org/licenses/>.
17*/
18
19mt_srand(microtime());
20
21$result = array();
22
23$result["speedthroughwater"] = mt_rand(0, 10);
24$result["speedoverground"] = mt_rand(0, 5);
25$result["waterdepth"] = mt_rand(1, 30);
26$result["watertemperature"] = mt_rand(15, 25);
27$result["satellites"] = mt_rand(0, 10);
28
29echo json_encode($result);
30
31?>
Note: See TracBrowser for help on using the repository browser.