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