suncky / stat-sdk
web php stat sdk
Installs: 6
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 0
Forks: 0
Open Issues: 0
Type:curl-extension
Requires
- php: >=5.4.0
This package is not auto-updated.
Last update: 2025-02-01 21:41:38 UTC
README
调用方法1
$operate = new Operation(['siteHash' => 'ab4e2cebd0f7f7442c57ae9a5cf5fe48', 'key' => 'a98yq239hjtoqgaog90agua0j', 'url' => 'http://uba.dev.xsteach.com/']); $data = $operate->turn(apiName, $eventType, $user_id, $data, $headers); // $data 和 $headers 是键值对数组 if($error = $data[1]) { echo 'code:'.$error->code().'message'.$error->message(); } else { print_r($data[0]); }
调用方法2
//配置中 $config['components']['trail'] => [ 'class' => 'xsteach\statSdk\processing\Operation', 'siteHash' => 'ab4e2cebd0f7f7442c57ae9a5cf5fe48', 'key' => '', 'url' => 'http://uba.dev.xsteach.com/' ] $data = Yii::$app->trail->turn('c', 'a', '323', [ 'tm' => 1465986567, 'course' => [['cid' => '123', 'cn' => '测试课程收藏2', 'cp' => '2300','st' =>0],['cid' => '124', 'cn' => '证书收藏2', 'cp' => '1400','st' =>1]]]); if($error = $data[1]) { echo 'code:'.$error->code().'message'.$error->message(); } else { print_r($data[0]); }