php-test / index.php
xadssa's picture
Update index.php
a173968
raw
history blame
681 Bytes
<?php
//http://39.134.24.162/dbiptv.sn.chinamobile.com/PLTV/88888888/224/3221225804/1.m3u8
$ou =isset($_GET['ou'])?$_GET['ou']:'2';
$cid = $_GET['id'];
$url = 'http://39.134.24.16'.$ou.'/dbiptv.sn.chinamobile.com/PLTV/88888888/224/322122'.$cid.'/1.m3u8';
$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, $url);
curl_setopt($curl, CURLOPT_TIMEOUT, 2);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
$data = curl_exec($curl);
curl_close($curl);
$data = preg_replace('/(\d+-\d+-\d+)(.hls.ts)/', 'http://39.134.24.16'.$ou.'/dbiptv.sn.chinamobile.com/PLTV/88888888/224/322122'.$cid.'/$1$2', $data);
echo $data;
header("Content-Disposition: attachment; filename=欧歌.m3u8");
?>