1 * http://amda.irap.omp.eu/AMDA/data/WSRESULT/getdataset_ace-imf-all_20130923T090000_20130924T130000.txt * [status] => done * * @apiErrorExample Error-Response: * {"error":"Cannot find info file for dataset ace-imf-any"} */ //ini_set("allow_url_fopen", true); require_once '../config.php'; if (!key_exists("token", $_GET)) { $result = array('success' => false, 'message' => "Authentication is required for this webservice."); exit(json_encode($result)); } if ($_GET['startTime'] && strpos($_GET['startTime'], ' ') !== false) { $result = array('success' => false, 'message' => "Check that there is no + (plus) character in your time definition. + is a special character and should be encoded by %2B"); exit(json_encode($result)); } $amda_ws = new WebServer(); if ($amda_ws->getNewToken()['token'] != $_GET["token"]) { $result = array('success' => false, 'status' => 'expired', 'message' => "Token expired. Please authenticate again."); } else { $result = $amda_ws->getDataset($_GET); } echo json_encode($result); ?>