vod_notify.php 725 B

123456789101112131415161718192021222324252627
  1. <?php
  2. //目前腾讯云支持三种消息类型的通知:0 — 断流; 1 — 推流;100 — 新的录制文件已生成;200 — 新的截图文件已生成。
  3. //https://www.qcloud.com/document/product/267/5957
  4. header("Content-Type:text/html; charset=utf-8");
  5. require '../system/system_init.php';
  6. //require '../system/common.php';
  7. $json = $GLOBALS['HTTP_RAW_POST_DATA'];
  8. $lvb_notify = json_decode($json,true);
  9. $ret = array();
  10. $ret['code'] = 1;
  11. if (count($lvb_notify) > 0){
  12. $lvb_notify['create_time'] = to_date(get_gmtime());
  13. $GLOBALS['db']->autoExecute(DB_PREFIX."lvb_notify", $lvb_notify,'INSERT');
  14. $lvb_id = $GLOBALS['db']->insert_id();
  15. if ($lvb_id > 0)
  16. $ret['code'] = 0;
  17. }
  18. echo json_encode($ret);