Add files via upload

pull/37/head
肥羊 3 years ago committed by GitHub
parent 9e85cb2a9c
commit f1ef96514a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 20
      PHP/bestv.php
  2. 15
      PHP/ghyx.php
  3. 19
      PHP/sxg.php

@ -1,19 +1,19 @@
<?php
date_default_timezone_set("Asia/Shanghai");
$channel = empty($_GET['id']) ? "cctv16hd4k/15000000" : trim($_GET['id']);
$array = explode("/", $channel);
$stream = "http://可用IP或域名/live/program/live/{$array[0]}/{$array[1]}/";
$stream = "http://223.111.117.11/liveplay-kk.rtxapp.com/live/program/live/{$channel}/";
$timestamp = substr(time(), 0, 9) - 7;
$current = "#EXTM3U" . "\r\n";
$current .= "#EXT-X-VERSION:3" . "\r\n";
$current .= "#EXT-X-TARGETDURATION:3" . "\r\n";
$current .= "#EXT-X-MEDIA-SEQUENCE:{$timestamp}" . "\r\n";
$current = "#EXTM3U" . PHP_EOL;
$current .= "#EXT-X-VERSION:3" . PHP_EOL;
$current .= "#EXT-X-TARGETDURATION:3" . PHP_EOL;
$current .= "#EXT-X-MEDIA-SEQUENCE:{$timestamp}" . PHP_EOL;
for ($i = 0; $i < 3; $i++) {
$timematch = $timestamp . '0';
$timefirst = date('YmdH', $timematch);
$current .= "#EXTINF:3," . "\r\n";
$current .= $stream . $timefirst . "/" . $timestamp . ".ts" . "\r\n";
$current .= "#EXTINF:3," . PHP_EOL;
$current .= $stream . $timefirst . "/" . $timestamp . ".ts" . PHP_EOL;
$timestamp = $timestamp + 1;
}
header("Content-Disposition: attachment; filename=playlist.m3u8");
echo $current;
header("Content-Type: application/vnd.apple.mpegurl");
header("Content-Disposition: attachment; filename=index.m3u8");
echo $current;

@ -1,16 +1,17 @@
<?php
$channel = empty($_GET['id']) ? "CCTV1HD_6000" : trim($_GET['id']);
$stream = "http://liveyfs.yun.gehua.net.cn:8088/live/ipcdn,{$channel}K/";
$stream = "http://111.31.122.45/yfsv.vsd.gehua.net.cn/live/ipcdn,{$channel}K/";
$timestamp = intval((time()-60)/6);
$current = "#EXTM3U"."\r\n";
$current.= "#EXT-X-VERSION:3"."\r\n";
$current.= "#EXT-X-TARGETDURATION:6"."\r\n";
$current.= "#EXT-X-MEDIA-SEQUENCE:{$timestamp}"."\r\n";
$current = "#EXTM3U".PHP_EOL;
$current.= "#EXT-X-VERSION:3".PHP_EOL;
$current.= "#EXT-X-TARGETDURATION:6".PHP_EOL;
$current.= "#EXT-X-MEDIA-SEQUENCE:{$timestamp}".PHP_EOL;
for ($i=0; $i<6; $i++)
{
$current.= "#EXTINF:6,"."\r\n";
$current.= $stream.rtrim(chunk_split($timestamp, 3, "/"), "/").".ts"."\r\n";
$current.= "#EXTINF:6,".PHP_EOL;
$current.= $stream.rtrim(chunk_split($timestamp, 3, "/"), "/").".ts".PHP_EOL;
$timestamp = $timestamp + 1;
}
header("Content-Type: application/vnd.apple.mpegurl");
header("Content-Disposition: attachment; filename=index.m3u8");
echo $current;

@ -3,19 +3,20 @@ date_default_timezone_set("Asia/Shanghai");
$channel = empty($_GET['id']) ? "emdy4k_8000" : trim($_GET['id']);
$array = explode("_", $channel);
if (isset($array[1])) {
$stream = "http://[240e:944:6::22]/live2.rxip.sc96655.com/live/8ne5i_sccn,{$array[0]}_hls_pull_{$array[1]}K/";
$stream = "http://[2409:8c02:21c:60::2b]/live2.rxip.sc96655.com/live/8ne5i_sccn,{$array[0]}_hls_pull_{$array[1]}K/";
} else {
$stream = "http://[240e:944:6::22]/live2.rxip.sc96655.com/live/8ne5i_sccn,{$array[0]}_hls_pull_4000K/";
$stream = "http://[2409:8c02:21c:60::2b]/live2.rxip.sc96655.com/live/8ne5i_sccn,{$array[0]}_hls_pull_4000K/";
}
$timestamp = intval((time() - 60) / 6);
$current = "#EXTM3U" . "\r\n";
$current .= "#EXT-X-VERSION:3" . "\r\n";
$current .= "#EXT-X-TARGETDURATION:6" . "\r\n";
$current .= "#EXT-X-MEDIA-SEQUENCE:{$timestamp}" . "\r\n";
$current = "#EXTM3U" . PHP_EOL;
$current .= "#EXT-X-VERSION:3" . PHP_EOL;
$current .= "#EXT-X-TARGETDURATION:6" . PHP_EOL;
$current .= "#EXT-X-MEDIA-SEQUENCE:{$timestamp}" . PHP_EOL;
for ($i = 0; $i < 6; $i++) {
$current .= "#EXTINF:6," . "\r\n";
$current .= $stream . rtrim(chunk_split($timestamp, 3, "/"), "/") . ".ts" . "\r\n";
$current .= "#EXTINF:6," . PHP_EOL;
$current .= $stream . rtrim(chunk_split($timestamp, 3, "/"), "/") . ".ts" . PHP_EOL;
$timestamp = $timestamp + 1;
}
header("Content-Type: application/vnd.apple.mpegurl");
header("Content-Disposition: attachment; filename=index.m3u8");
echo $current;
echo $current;
Loading…
Cancel
Save