|
@@ -261,25 +261,24 @@
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- echo "Request payload (JSON):" . PHP_EOL;
|
|
|
- var_dump($json);
|
|
|
+ //echo "Request payload (JSON):" . PHP_EOL;
|
|
|
+ //var_dump($json);
|
|
|
|
|
|
// build HTTP context
|
|
|
$context = stream_context_create([
|
|
|
'http' => [
|
|
|
'method' => 'POST',
|
|
|
- 'header' => //"Authorization: Basic " . base64_encode("$kdb_username:$kdb_password") . "\r\n" .
|
|
|
+ 'header' => "Authorization: Basic " . base64_encode("$kdb_username:$kdb_password") . "\r\n" .
|
|
|
"Content-type: application/json" . "\r\n" .
|
|
|
"Connection: close" . "\r\n",
|
|
|
'content' => json_encode($json),
|
|
|
],
|
|
|
]);
|
|
|
|
|
|
- //$KDB_API_URL = "https://kdb-test.kaas.kit.edu/kdb-api.fcgi/json/write";
|
|
|
- $KDB_API_URL = "http://localhost:9999/json/write";
|
|
|
+ $KDB_API_URL = "https://kdb-test.kaas.kit.edu/kdb-api.fcgi/json/write";
|
|
|
+ //$KDB_API_URL = "http://localhost:9999/json/write";
|
|
|
|
|
|
echo "Updating database." . PHP_EOL;
|
|
|
- // new kdb.kaas.kit.edu added and optimized readout parameters
|
|
|
$fileip = file_get_contents($KDB_API_URL, false, $context);
|
|
|
|
|
|
//echo $fileip . PHP_EOL;
|
|
@@ -291,8 +290,8 @@
|
|
|
}
|
|
|
|
|
|
$json = json_decode($fileip, true);
|
|
|
- echo "Database result (JSON):" . PHP_EOL;
|
|
|
- var_dump($json);
|
|
|
+ //echo "Database result (JSON):" . PHP_EOL;
|
|
|
+ //var_dump($json);
|
|
|
|
|
|
if ($errorcount > 0) {
|
|
|
echo $errormessage;
|