urlencode
This commit is contained in:
parent
d0bd5b40c3
commit
7d46cfbcab
@ -44,7 +44,7 @@ class ErrorHandler {
|
|||||||
$json = json_encode($error);
|
$json = json_encode($error);
|
||||||
$info = base64_encode($json);
|
$info = base64_encode($json);
|
||||||
|
|
||||||
$url = UpdateManager::URL_WEBSERVICE . "errorreport?error=" . $info;
|
$url = UpdateManager::URL_WEBSERVICE . "errorreport?error=" . urlencode($info);
|
||||||
$success = FileUtil::loadFile($url);
|
$success = FileUtil::loadFile($url);
|
||||||
|
|
||||||
if (!json_decode($success)) {
|
if (!json_decode($success)) {
|
||||||
@ -85,7 +85,7 @@ class ErrorHandler {
|
|||||||
$json = json_encode($error);
|
$json = json_encode($error);
|
||||||
$info = base64_encode($json);
|
$info = base64_encode($json);
|
||||||
|
|
||||||
$url = UpdateManager::URL_WEBSERVICE . "errorreport?error=" . $info;
|
$url = UpdateManager::URL_WEBSERVICE . "errorreport?error=" . urlencode($info);
|
||||||
$success = FileUtil::loadFile($url);
|
$success = FileUtil::loadFile($url);
|
||||||
|
|
||||||
if (!json_decode($success)) {
|
if (!json_decode($success)) {
|
||||||
|
@ -39,7 +39,7 @@ class MXMapInfo {
|
|||||||
$this->id = $mx->MapID;
|
$this->id = $mx->MapID;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!isset($mx->GbxMapName) || $mx->GbxMapName == '') {
|
if (!isset($mx->GbxMapName) || $mx->GbxMapName == '?') {
|
||||||
$this->name = $mx->Name;
|
$this->name = $mx->Name;
|
||||||
} else {
|
} else {
|
||||||
$this->name = Formatter::stripDirtyCodes($mx->GbxMapName);
|
$this->name = Formatter::stripDirtyCodes($mx->GbxMapName);
|
||||||
|
@ -3,6 +3,7 @@
|
|||||||
namespace ManiaControl\Server;
|
namespace ManiaControl\Server;
|
||||||
|
|
||||||
use ManiaControl\Callbacks\TimerListener;
|
use ManiaControl\Callbacks\TimerListener;
|
||||||
|
use ManiaControl\Formatter;
|
||||||
use ManiaControl\ManiaControl;
|
use ManiaControl\ManiaControl;
|
||||||
use ManiaControl\UpdateManager;
|
use ManiaControl\UpdateManager;
|
||||||
|
|
||||||
@ -52,7 +53,7 @@ class UsageReporter implements TimerListener {
|
|||||||
$properties['PHPVersion'] = phpversion();
|
$properties['PHPVersion'] = phpversion();
|
||||||
$properties['ServerLogin'] = $this->maniaControl->server->login;
|
$properties['ServerLogin'] = $this->maniaControl->server->login;
|
||||||
$properties['TitleId'] = $this->maniaControl->server->titleId;
|
$properties['TitleId'] = $this->maniaControl->server->titleId;
|
||||||
$properties['ServerName'] = $this->maniaControl->server->getName();
|
$properties['ServerName'] = Formatter::stripDirtyCodes($this->maniaControl->server->getName());
|
||||||
$properties['PlayerCount'] = $this->maniaControl->playerManager->getPlayerCount();
|
$properties['PlayerCount'] = $this->maniaControl->playerManager->getPlayerCount();
|
||||||
|
|
||||||
try {
|
try {
|
||||||
@ -72,7 +73,7 @@ class UsageReporter implements TimerListener {
|
|||||||
$json = json_encode($properties);
|
$json = json_encode($properties);
|
||||||
$info = base64_encode($json);
|
$info = base64_encode($json);
|
||||||
|
|
||||||
$this->maniaControl->fileReader->loadFile(UpdateManager::URL_WEBSERVICE . "/usagereport?info=" . $info, function ($response, $error) {
|
$this->maniaControl->fileReader->loadFile(UpdateManager::URL_WEBSERVICE . "/usagereport?info=" . urlencode($info), function ($response, $error) {
|
||||||
$response = json_decode($response);
|
$response = json_decode($response);
|
||||||
if ($error || !$response) {
|
if ($error || !$response) {
|
||||||
$this->maniaControl->log("Error while Sending data: " . $error);
|
$this->maniaControl->log("Error while Sending data: " . $error);
|
||||||
|
Loading…
Reference in New Issue
Block a user