PHP SDK for Mobile Tencent Analytics (MTA)

v2.1.1 2021-01-11 04:47 UTC

This package is auto-updated.

Last update: 2021-04-11 05:37:43 UTC


README

PHPUnit

使用

<?php

use Xin\Mta\Factory;
use Xin\Mta\H5\Application;
use GuzzleHttp\HandlerStack;

$config = [
    'app_id' => 'xxx',
    'secret_key' => 'xxx',
    'http' => [
        // You can replace it by your own handler. For example SwooleCoroutineHandler.
        'handler' => HandlerStack::create(null),
    ],
];

/** @var Application $app */
$app = Factory::make('h5', $this->getConfig());

$res = $app->page->realtime();

var_dump($res);

鸣谢

感谢 freyo 同学提供了 mta-h5,让我少写了一大片代码。