Giter VIP home page Giter VIP logo

Comments (2)

qist avatar qist commented on August 30, 2024
<?php
error_reporting(0);
$id = isset($_GET['id'])?$_GET['id']:'fhzx';
$fmt = isset($_GET['fmt'])?$_GET['fmt']:'hls';//hls flv
$n = [
  'fhzx' => '7c96b084-60e1-40a9-89c5-682b994fb680',  //资讯台
  'fhzw' => 'f7f48462-9b13-485b-8101-7b54716411ec',  //中文台
  'fhhk' => '15e02d92-1698-416c-af2f-3e9a872b4d78',  //香港台
  ];
if($fmt == 'hls') $url = "https://m.fengshows.com/api/v3/hub/live/auth-url?stream_type=hls&live_id={$n[$id]}&live_qa=HD";
if($fmt == 'flv') $url = "https://m.fengshows.com/api/v3/hub/live/auth-url?stream_type=flv&live_id={$n[$id]}&live_qa=HD";
$live = get_headers(json_decode(file_get_contents($url))->data->live_url,1)['Location'];
if($fmt == 'flv') {
   header('Location:'.$live);
   //echo $live;
   }
if($fmt == 'hls') {
   $burl = "http://qctv.fengshows.cn/live/";
   $cur = preg_replace("/(.*?.ts)/i", $burl."$1",file_get_contents($live));
   if($id == 'fhzw') $cur = $cur;
   else $cur = preg_replace("/48-/","72-",$cur);
   header("Content-Type: application/vnd.apple.mpegurl");
   print_r($cur);
   }
?>

用这个

from tvbox.

outcastveron avatar outcastveron commented on August 30, 2024

我试试看,多谢多谢

from tvbox.

Related Issues (15)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.