diff --git a/php/WebServices/WebServer.php b/php/WebServices/WebServer.php
index abaa05e..d5d7df3 100644
--- a/php/WebServices/WebServer.php
+++ b/php/WebServices/WebServer.php
@@ -234,7 +234,7 @@ class WebServer
 			$params[] = $param;
 		}
 
-		$ref_sampling_param = isset($formatInfo['ref_sampling_param']) ? $formatInfo['ref_sampling_param'] : NULL;
+		$ref_sampling_param = isset($interval['ref_sampling_param']) ? $interval['ref_sampling_param'] : NULL;
 
 		$obj = (object)array(
 						"sampling" => $interval['sampling'],
@@ -426,28 +426,49 @@ class WebServer
 			$timeFormat = $vars["timeFormat"];
 		}
 
+		$sampling = !empty($vars["sampling"]) ? $vars["sampling"] : NULL;
+		$ref_sampling_param = NULL;
+		$file_info = "";
 
 		if (empty($vars["parameterID"])) {
 			$this->throwError("requestError", "Missing parameterID definition");
 		}
 		$paramId = array();
-		array_push($paramId, $vars["parameterID"]);
+		if (strpos($vars["parameterID"], ',')) {
+			$paramId = explode(',', $vars["parameterID"]);
+
+			if (!isset($sampling))
+			{
+				$ref_sampling_param = trim($paramId[0]);
+			}
+
+			foreach ($paramId as &$id) {
+				$id = trim($id);
+				if (!empty($file_info)) {
+					$file_info .= "-";
+				}
+				$file_info .= $id;
+			}
+		}
+		else {
+			array_push($paramId, $vars["parameterID"]);
+			$file_info = $vars["parameterID"];
+		}
 
 		if (empty($vars["gzip"]))
 			$gzip = 0;
 		else
 			$gzip = ($vars["gzip"] == 1);
 
-		$sampling = !empty($vars["sampling"]) ? $vars["sampling"] : NULL;
-
 		$outputFormat = !empty($vars["outputFormat"]) ? $vars["outputFormat"] : 'ASCII'; 
 			
 		$this->service = strtolower(__FUNCTION__);
 
 		$res = $this->doDownloadRequest(
-					array("startTime" => $vars["startTime"], "stopTime" => $vars["stopTime"], "sampling" => $sampling),
+					array("startTime" => $vars["startTime"], "stopTime" => $vars["stopTime"], "sampling" => $sampling,
+						"ref_sampling_param" => $ref_sampling_param),
 					array("params" => $paramId),
-					array("format" => $outputFormat, "timeFormat"=> $timeFormat, "gzip"=>$gzip), $paramId);
+					array("format" => $outputFormat, "timeFormat"=> $timeFormat, "gzip"=>$gzip), $file_info);
  
 		if ($res['success']) 
 			return $res;
--
libgit2 0.21.2