stat.php 684 B

12345678910111213141516171819202122232425262728293031323334
  1. <?php
  2. $stime = strtotime("-1 day");
  3. $etime = strtotime("-1 day");
  4. # 数据收集的配置
  5. return array
  6. (
  7. # 获取用户增减数据
  8. 'stat_user_sum' => array
  9. (
  10. 'url' => 'https://api.weixin.qq.com/datacube/getusersummary?',
  11. 'param' => array
  12. (
  13. 'access_token' => 'token',
  14. 'begin_date' => date('Y-m-d', $stime),
  15. 'end_date' => date('Y-m-d', $etime),
  16. ),
  17. 'json' => true,
  18. ),
  19. # 获取累计用户数据
  20. 'stat_user_total' => array
  21. (
  22. 'url' => 'https://api.weixin.qq.com/datacube/getusercumulate?',
  23. 'param' => array
  24. (
  25. 'access_token' => 'token',
  26. 'begin_date' => date('Y-m-d', $stime),
  27. 'end_date' => date('Y-m-d', $etime),
  28. ),
  29. 'json' => true,
  30. ),
  31. );