adjustments
This commit is contained in:
parent
dff6e2f15c
commit
6eb2940d59
@ -3,20 +3,24 @@
|
||||
$url = 'http://@concordia_host@:@concordia_port@';
|
||||
$inputSentence = $_GET["pattern"];
|
||||
$tmId = intval($_GET["tmId"]);
|
||||
$data = array("operation" => "concordiaSearch","tmId" => $tmId,"pattern" => $inputSentence);
|
||||
|
||||
// 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);
|
||||
$response = file_get_contents($url, false, $context);
|
||||
if (!empty($inputSentence)) {
|
||||
$request = array("operation" => "concordiaSearch","tmId" => $tmId,"pattern" => $inputSentence);
|
||||
|
||||
$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) {
|
||||
if (is_null($end)) {
|
||||
|
@ -623,7 +623,7 @@ label {
|
||||
}
|
||||
input, textarea {
|
||||
clear: both;
|
||||
font-size: 140%;
|
||||
font-size: 100%;
|
||||
font-family: "frutiger linotype", "lucida grande", "verdana", sans-serif;
|
||||
padding: 1%;
|
||||
width:98%;
|
||||
|
Loading…
Reference in New Issue
Block a user