Usage sending in background

This commit is contained in:
Shoghi Cervantes Pueyo 2013-04-07 12:28:34 +02:00
parent 12f9c12fe4
commit 1d32e82265

View File

@ -226,15 +226,19 @@ class ServerAPI{
foreach($this->plugin->getList() as $p){
$plist .= str_replace(array(";", ":"), "", $p["name"]).":".str_replace(array(";", ":"), "", $p["version"]).";";
}
Utils::curl_post("http://stats.pocketmine.net/usage.php", array(
"serverid" => $this->server->serverID,
"os" => Utils::getOS(),
"version" => MAJOR_VERSION,
"protocol" => CURRENT_PROTOCOL,
"online" => count($this->server->clients),
"max" => $this->server->maxClients,
"plugins" => $plist,
), 10);
Async::call("Utils::curl_post", array(
0 => "http://stats.pocketmine.net/usage.php",
1 => array(
"serverid" => $this->server->serverID,
"os" => Utils::getOS(),
"version" => MAJOR_VERSION,
"protocol" => CURRENT_PROTOCOL,
"online" => count($this->server->clients),
"max" => $this->server->maxClients,
"plugins" => $plist,
),
2 => 10
));
}
public function __destruct(){