Esempio n. 1
0
function print_dau()
{
    header("Content-Type: text/plain");
    $end_time = time();
    $start_time = $end_time - 24 * 3600;
    $daustore = new DAUAdapter();
    $data = $daustore->get_dau(null, $start_time, $end_time);
    print_r($data);
}
Esempio n. 2
0
function get_dau()
{
    global $game_cfg, $server_cfg;
    $gid = $game_cfg["gameid"];
    $snid = $this->game_cfg["snid"] ? $this->game_cfg["snid"] : null;
    $cid = $this->game_cfg["cid"] ? $this->game_cfg["cid"] : null;
    $end_time = time();
    $start_time = $end_time - 1800;
    $daustore = new DAUAdapter();
    $dau = $daustore->get_dau($gid, $start_time, $end_time, $snid, $cid);
    $last2 = array_splice($dau, -2, 2);
    if (count($last2) != 2) {
        return array(-1, -1);
    }
    return get_column_vector($last2, "DAU");
}