PHP-Code:
<?php
- ini_set('error_reporting', E_ALL);
- if( isset($_GET['kanal']) ){
- if( $_GET['kanal'] == haberturk ) {$id = 's-KKgm4ysjk';}
- elseif( $_GET['kanal'] == tgrthaber ) {$id = 'uJ4YQ98Yl1w';}
- elseif( $_GET['kanal'] == tvnet ) {$id = 'Jhvzv53keOw';}
- elseif( $_GET['kanal'] == cnn ) {$id = 'kgWXzDC6JGE';}
- elseif( $_GET['kanal'] == showtv ) {$id = 'inOugVa_NYA';}
- elseif( $_GET['kanal'] == star ) {$id = 'xbfzLTDNHNo';}
- elseif( $_GET['kanal'] == trthaber ) {$id = 'c0SjTAoBI8Y';}
- elseif( $_GET['kanal'] == kanald ) {$id = 'AFeyEMf8-y8';}
- }
- $channelid = $id;
- $id = $_GET['kanal'];
- ini_set("user_agent","facebookexternalhit/1.1 (+http://www.facebook.com/externalhit_uatext.php)");
- function get_data($html) {
- $ch = curl_init();
- $timeout = 5;
- curl_setopt($ch, CURLOPT_URL, $html);
- curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
- curl_setopt($ch, CURLOPT_USERAGENT, "facebookexternalhit/1.1 (+http://www.facebook.com/externalhit_uatext.php)");
- curl_setopt($ch, CURLOPT_REFERER, "http://facebook.com");
- curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
- curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, $timeout);
- $data = curl_exec($ch);
- curl_close($ch);
- return $data;
- }
- $html = file_get_contents("https://www.youtube.com/watch?v=" . $channelid);
- preg_match_all(
- '/(hlsManifestUrl.*?\.m3u8[^&">]+)/',
- $html,
- $posts, // will contain the article data
- PREG_SET_ORDER // formats data into an array of posts
- );
- foreach ($posts as $post) {
- $link = $post[0];
- $link = stripslashes($post[0]);
- $link = str_replace("hlsManifestUrl","",$link);
- $link = str_replace("\":\"","",$link);
- /* 96=1920x1080, 95=1280x720, 94=854x480, 93=640x360 */
- $man = get_data($link);
- preg_match_all('/(https:\/.*\/95\/.*index.m3u8)/U',$man,$matches, PREG_PATTERN_ORDER);
- $link1=$matches[1][0];
- header("Content-Type application/vnd.apple.mpegurl");
- //header('Content-Type: video/mp2t');
- header("Location: $link1");
- }
- ?>
bu sekil dene yalniz mesala showtv ) {$id = 'inOugVa_NYA';} burdaki degerleri kendine göre düzelt.
çalistırmak için de [Sadece kayıtlı ve aktif kullanıcılar bağlantıları görebilir.] Kayıt Olmak İçin Tıklayınız..
Geändert von bahri (22.06.20 um 00:09 Uhr)