concordia-server/cat/concordia_gate.php_pattern
2019-01-17 12:20:36 +01:00

20 lines
677 B
Plaintext

<?php
$url = 'http://@concordia_host@:@concordia_port@';
$intervalsArray = array();
$data = array("operation" => $_POST["operation"],"tmId" => intval($_POST["tmId"]),"limit" => intval($_POST["limit"]),"offset" => intval($_POST["offset"]),"pattern" => $_POST["pattern"],"intervals" => $intervalsArray);
// use key 'http' even if you send the request to https://...
$options = array(
'http' => array(
'header' => "Content-type: application/x-www-form-urlencoded\r\n",
'method' => 'POST',
'content' => json_encode($data),
),
);
$context = stream_context_create($options);
$result = file_get_contents($url, false, $context);
print $result;
?>