usage reports via POST
This commit is contained in:
parent
8612521559
commit
7d92b17975
@ -76,15 +76,14 @@ class UsageReporter implements TimerListener {
|
|||||||
|
|
||||||
$properties['ActivePlugins'] = $this->maniaControl->getPluginManager()->getActivePluginsIds();
|
$properties['ActivePlugins'] = $this->maniaControl->getPluginManager()->getActivePluginsIds();
|
||||||
|
|
||||||
$json = json_encode($properties);
|
$usageReport = json_encode($properties);
|
||||||
$info = base64_encode($json);
|
|
||||||
|
|
||||||
$url = ManiaControl::URL_WEBSERVICE . '/usagereport?info=' . urlencode($info);
|
$url = ManiaControl::URL_WEBSERVICE . 'usagereport';
|
||||||
$this->maniaControl->getFileReader()->loadFile($url, function ($response, $error) {
|
$this->maniaControl->getFileReader()->postData($url, function ($response, $error) {
|
||||||
$response = json_decode($response);
|
$response = json_decode($response);
|
||||||
if ($error || !$response) {
|
if ($error || !$response) {
|
||||||
Logger::logError('Error while Sending data: ' . print_r($error, true));
|
Logger::logError('Error while Sending data: ' . print_r($error, true));
|
||||||
}
|
}
|
||||||
});
|
}, $usageReport);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user