limingxinleo / mta
PHP SDK for Mobile Tencent Analytics (MTA)
v2.2.0
2021-06-22 03:32 UTC
Requires
- php: >=7.3
- guzzlehttp/guzzle: ^6.3|^7.0
- hyperf/utils: ^2.1
- pimple/pimple: ^3.2
Requires (Dev)
- friendsofphp/php-cs-fixer: ^2.14
- phpstan/phpstan: ^0.12
- phpunit/phpunit: >=5.7
- swoft/swoole-ide-helper: dev-master
README
使用
<?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,让我少写了一大片代码。