getVOtable.php 729 Bytes
<?php
  
/** 
*   @file getParameter.php 
*   @brief  REST interface for service getParameter
*
*   
*   @version $Id:  $ 
*/
  ini_set("allow_url_fopen", true);
  require_once '../config.php';

  $amda_ws = new WebServer();
  $result = $amda_ws->getDataset($_GET);

  if ($result['success']){
      $file = str_replace("http://oberoi.cesr.fr/AMDA-WS/",BASE_PATH ,$result['dataFileURLs']);

      if ($file){
	$contenu = file_get_contents($file); 

	echo $contenu; 

      }
    }
    else {
      $success = "false";
      echo '<?xml version="1.0" encoding="UTF-8"?><getParameterResponse>';
      echo '<success>'.$success.'</success>';
      echo '<message>'.$result['message'].'</message></getParameterResponse>';  
    }
?>