Cron.php 463 B

123456789101112131415161718192021222324252627
  1. <?php
  2. namespace Live\Lib;
  3. use Dever;
  4. class Cron
  5. {
  6. public function getStream_api()
  7. {
  8. }
  9. # 定时获取 所有流的状态
  10. public function getStream()
  11. {
  12. $data = Dever::db('live/stream')->state();
  13. if ($data) {
  14. foreach ($data as $k => $v) {
  15. $handle = new Handle();
  16. $data = $handle->get($v['id']);
  17. }
  18. }
  19. return 'yes';
  20. }
  21. }