You are on page 1of 1

<?

php session_start(); $id=$_GET['id']; $ts=$_GET['ts'];


$url='http://www.adulttvlive.net/channels/'.$id.'.php'; function
file_get_contents_curl($url, $refer, $useragent) { $ch = curl_init();
curl_setopt( $ch, CURLOPT_REFERER, $refer ); curl_setopt( $ch,
CURLOPT_RETURNTRANSFER, 1 ); curl_setopt($ch, CURLOPT_URL, $url ); curl_setopt($ch,
CURLOPT_USERAGENT, $useragent); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0); //curl_setopt($ch,
CURLOPT_FOLLOWLOCATION, TRUE ); $data = curl_exec( $ch ); curl_close( $ch ); return
$data; } if($id<>''){ if ((!isset($_SESSION['link'])) OR ($_SESSION['id']<>$id))
{ $contenidophp=file_get_contents_curl($url, 'http://www.adulttvlive.net',
'Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko)
Chrome/70.0.3538.110 Safari/537.36'); preg_match_all('/{source:"(.*?)",height/',
$contenidophp, $matches); $_SESSION['link'] = $matches[1][0];
$_SESSION['id']=$id; } preg_match_all('/http(.*?)playlist/', $_SESSION['link'],
$resultado); $_SESSION['link-ts']='http'.$resultado[1][0]; $contenido =
file($_SESSION['link']); $url='http'.$resultado[1][0].$contenido[3];
$contenido=file($url); $contenido[5]='nolocal.php?ts='.$contenido[5];
$contenido[7]='nolocal.php?ts='.$contenido[7]; $contenido[9]='nolocal.php?ts='.
$contenido[9]; $contenido[11]='nolocal.php?ts='.$contenido[11];
$contenido=str_replace('&','AND',implode($contenido)); echo $contenido; } if(!
empty($ts)){ header ("Content-Type: video/MP2T"); header ('Content-Disposition:
attachment; filename=Segment.ts '); $url=$_SESSION['link-
ts'].str_replace('AND','&',$ts); $file = file_get_contents($url); echo $file; } ?>

You might also like