getOrbites.php 651 Bytes
<?php

/**
 * @file getParameter.php
 * @brief  REST interface for service getParameter
 *
 *
 * @version $Id:  $
 */

require_once '../config.php';

$amda_ws = new WebServer();

if (!key_exists("token", $_GET)) {
    $result = array('success' => false, 'message' => "E01: Authentication is required for this webservice.");
} else if ($amda_ws->getNewToken()['token'] != $_GET["token"]) {
    $result = array('success' => false, 'message' => "E02: Token expired. Please authenticate again.");
} else {
    $result = $amda_ws->getOrbites($_GET);
}

if ($result['success']) {
    echo $result['dataFileURLs'];
} else {
    echo $result['message'];
}

?>