adjustments

This commit is contained in:
Rafał Jaworski 2017-02-22 11:22:20 +01:00
parent dff6e2f15c
commit 6eb2940d59
2 changed files with 17 additions and 13 deletions

View File

@ -3,20 +3,24 @@
$url = 'http://@concordia_host@:@concordia_port@'; $url = 'http://@concordia_host@:@concordia_port@';
$inputSentence = $_GET["pattern"]; $inputSentence = $_GET["pattern"];
$tmId = intval($_GET["tmId"]); $tmId = intval($_GET["tmId"]);
$data = array("operation" => "concordiaSearch","tmId" => $tmId,"pattern" => $inputSentence);
// use key 'http' even if you send the request to https://... if (!empty($inputSentence)) {
$options = array( $request = array("operation" => "concordiaSearch","tmId" => $tmId,"pattern" => $inputSentence);
'http' => array(
'header' => "Content-type: application/x-www-form-urlencoded\r\n",
'method' => 'POST',
'content' => json_encode($data),
),
);
$context = stream_context_create($options);
$response = file_get_contents($url, false, $context);
$data = json_decode($response); // 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($request),
),
);
$context = stream_context_create($options);
$response = file_get_contents($url, false, $context);
$data = json_decode($response);
}
function sub($string, $start, $end = null) { function sub($string, $start, $end = null) {
if (is_null($end)) { if (is_null($end)) {

View File

@ -623,7 +623,7 @@ label {
} }
input, textarea { input, textarea {
clear: both; clear: both;
font-size: 140%; font-size: 100%;
font-family: "frutiger linotype", "lucida grande", "verdana", sans-serif; font-family: "frutiger linotype", "lucida grande", "verdana", sans-serif;
padding: 1%; padding: 1%;
width:98%; width:98%;