iyi aksamlar, sabantv.com dan nasil m3u8 link aliriz yardimci ola bilicek biri varmi ? benim yaptigim kod ile m3u8 linki buluyor ama çalistiramadim bir turlu :
PHP- Kodu:
<?php
- function baglan($url) {
- $ch = curl_init();
- $host = $_SERVER['HTTP_X_FORWARDED_FOR'];
- $headers = array(
- 'authority: kdlive.duhnet.tv',
- 'Connection: keep-alive',
- 'User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/84.0.4147.105 Safari/537.36',
- 'Origin: '.$url.'',
- 'Sec-Fetch-Site: cross-site',
- 'Sec-Fetch-Mode: cors',
- 'Sec-Fetch-Dest: empty',
- 'Referer: '.$url.'',
- 'Host '.$host.'');
- $timeout = 5;
- curl_setopt($ch, CURLOPT_URL, $url);
- curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);;
- curl_setopt($ch, CURLOPT_REFERER, $url);
- curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
- curl_setopt($ch,CURLOPT_TIMEOUT,30);
- curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
- $data = curl_exec($ch);
- curl_close($ch);
- return str_replace(array("\\"),"",$data);
- }
- $kaynak = baglan("https://www.sabantv.com/mobile/");
- preg_match('/var playerKey = "(.*?)"/i',$kaynak,$key);
- $m3u = "https://p224.radyotelekom.com.tr/player/m3u8/$key[1]/$key[1].m3u8";
- header('Content-type:application/javascript');
- header('Location: '.$m3u);
- exit();
- ?>