���� JFIF �� � ( %"1"%)+...383,7(-.-
![]() Server : Apache/2.4.6 (CentOS) OpenSSL/1.0.2k-fips PHP/7.4.20 System : Linux st2.domain.com 3.10.0-1127.10.1.el7.x86_64 #1 SMP Wed Jun 3 14:28:03 UTC 2020 x86_64 User : apache ( 48) PHP Version : 7.4.20 Disable Function : NONE Directory : /var/www/html/vidoe.top/proxy/ |
<?php if (substr_count($_SERVER['HTTP_ACCEPT_ENCODING'], 'gzip')){ ob_start('ob_gzhandler'); }else{ ob_start(); } session_start(); define('ROOT_PATH', dirname(__FILE__) . '/'); include_once ROOT_PATH.'simple_html_dom.php'; function str_encode($data,$pwd) { $x = 0; $a = 0; $j = 0; $Zcrypt = ''; $pwd_length = strlen($pwd); for ($i = 0; $i < 255; $i++) { $key[$i] = ord(substr($pwd, ($i % $pwd_length)+1, 1)); $counter[$i] = $i; } for ($i = 0; $i < 255; $i++) { $x = ($x + $counter[$i] + $key[$i]) % 256; $temp_swap = $counter[$i]; $counter[$i] = $counter[$x]; $counter[$x] = $temp_swap; } for ($i = 0; $i < strlen($data); $i++) { $a = ($a + 1) % 256; $j = ($j + $counter[$a]) % 256; $temp = $counter[$a]; $counter[$a] = $counter[$j]; $counter[$j] = $temp; $k = $counter[(($counter[$a] + $counter[$j]) % 256)]; $Zcipher = ord(substr($data, $i, 1)) ^ $k; $Zcrypt .= chr($Zcipher); } return $Zcrypt; } function bodau($str) { $chuCoDau=array("à","á","ạ","ả","ã","â","ầ","ấ","ậ","ẩ","ẫ","ă", "ằ","ắ","ặ","ẳ","ẵ","è","é","ẹ","ẻ","ẽ","ê","ề" ,"ế","ệ","ể","ễ", "ì","í","ị","ỉ","ĩ", "ò","ó","ọ","ỏ","õ","ô","ồ","ố","ộ","ổ","ỗ","ơ" ,"ờ","ớ","ợ","ở","ỡ", "ù","ú","ụ","ủ","ũ","ư","ừ","ứ","ự","ử","ữ", "ỳ","ý","ỵ","ỷ","ỹ", "đ", "À","Á","Ạ","Ả","Ã","Â","Ầ","Ấ","Ậ","Ẩ","Ẫ","Ă" ,"Ằ","Ắ","Ặ","Ẳ","Ẵ", "È","É","Ẹ","Ẻ","Ẽ","Ê","Ề","Ế","Ệ","Ể","Ễ", "Ì","Í","Ị","Ỉ","Ĩ", "Ò","Ó","Ọ","Ỏ","Õ","Ô","Ồ","Ố","Ộ","Ổ","Ỗ","Ơ" ,"Ờ","Ớ","Ợ","Ở","Ỡ", "Ù","Ú","Ụ","Ủ","Ũ","Ư","Ừ","Ứ","Ự","Ử","Ữ", "Ỳ","Ý","Ỵ","Ỷ","Ỹ", "Đ","?","&",",","/",".","!","@","#","$","%","//",":","\"","\\","'","$","^","(",")","\"","=","_","__","\"","“","”","-"," - "); $chuKoDau=array("a","a","a","a","a","a","a","a","a","a","a" ,"a","a","a","a","a","a", "e","e","e","e","e","e","e","e","e","e","e", "i","i","i","i","i", "o","o","o","o","o","o","o","o","o","o","o","o" ,"o","o","o","o","o", "u","u","u","u","u","u","u","u","u","u","u", "y","y","y","y","y", "d", "A","A","A","A","A","A","A","A","A","A","A","A" ,"A","A","A","A","A", "E","E","E","E","E","E","E","E","E","E","E", "I","I","I","I","I", "O","O","O","O","O","O","O","O","O","O","O","O" ,"O","O","O","O","O", "U","U","U","U","U","U","U","U","U","U","U", "Y","Y","Y","Y","Y", "D","","","","","","","","","","","","","","","","","","","","","","","","","","","",'-'); $outstr = str_replace($chuCoDau,$chuKoDau,$str); $outstr = strtolower(trim($outstr)); //$outstr = $this->clean_value($outstr); return $outstr; } function format_string($str2){ $str = bodau($str2); $str = preg_replace('/^[^\p{L}\p{Nd}]+/',' ', $str); $str = trim($str); $str = preg_replace('/\s+/', ' ', $str); $str = preg_replace('/\s+/', '-', $str); return empty($str)?str_replace(' ','-',$str2):strtolower($str); } function get_youtube_id_from_url($url) { if (stristr($url,'youtu.be/')) {preg_match('/(https:|http:|)(\/\/www\.|\/\/|)(.*?)\/(.{11})/i', $url, $final_ID); return $final_ID[4]; } else {@preg_match('/(https:|http:|):(\/\/www\.|\/\/|)(.*?)\/(embed\/|watch.*?v=|)([a-z_A-Z0-9\-]{11})/i', $url, $IDD); return $IDD[5]; } } function get_content_phim47($url) { $header[0] = "Accept: text/xml,application/xml,application/xhtml+xml,"; $header[0] .= "text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5"; $header[] = "Cache-Control: max-age=0"; $header[] = "Connection: keep-alive"; $header[] = "Keep-Alive: 300"; $header[] = "Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7"; $header[] = "Accept-Language: en-us,en;q=0.5"; $header[] = "Pragma: "; // browsers keep this blank. $process = curl_init($url); curl_setopt($process, CURLOPT_HTTPHEADER, $header); curl_setopt($process, CURLOPT_HEADER, 0); curl_setopt($process, CURLOPT_USERAGENT, 'Googlebot/2.1 (+http://www.google.com/bot.html)'); //curl_setopt($process, CURLOPT_COOKIEFILE, dirname(__FILE__).'/'.'cookies_anhtrang2.txt'); //curl_setopt($process, CURLOPT_COOKIEJAR, dirname(__FILE__).'/'.'cookies_anhtrang2.txt'); curl_setopt($process, CURLOPT_REFERER, 'http://v1vn.com'); curl_setopt($process, CURLOPT_ENCODING, 'gzip,deflate'); //curl_setopt($process,CURLOPT_ENCODING , compression); curl_setopt($process, CURLOPT_TIMEOUT, 5); //if (proxy) curl_setopt($cUrl, CURLOPT_PROXY, 'proxy_ip:proxy_port'); curl_setopt($process, CURLOPT_RETURNTRANSFER, 1); //curl_setopt($process, CURLOPT_FOLLOWLOCATION, 1); $return = curl_exec($process); curl_close($process); //$content = strip_tags($return,'<div><a><p><span><li><ul><object><embed><b><font>'); return $return; } $country = 'KR'; if(isset($_GET['country'])){ $country = $_GET['country']; } $type = ''; if(isset($_GET['type'])){ $type=$_GET['type']; } switch($type){ default: $url_get = 'https://www.youtube.com/live/?gl='.$country; $day_time = date('d-m-Y'); $day_file_name = $country.'-'.$day_time; if(!file_exists('../cache/youtube/live-page-'.$day_file_name)){ $content2 = get_content_phim47($url_get); if(trim($content2)!='') { file_put_contents('../cache/youtube/live-page-' . $day_file_name, $content2); } }else{ $content2 = file_get_contents('../cache/youtube/live-page-'.$day_file_name); } $html = str_get_html($content2); $title_yt = $url_channel = $title_channel = ''; foreach($html->find('li.feed-item-container') as $key=>$val){ $arr_list = array(); $url_channel = $val->find('h2.branded-page-module-title a',0)->href; $arr_url_channer = explode('list=',$url_channel); $id_pl_yt = $arr_url_channer[1]; $title_channel = $val->find('span.branded-page-module-title-text span',0)->plaintext; $arr_list['title_pl'] = $title_channel; $arr_list['ftitle_pl'] = format_string($title_channel); $arr_list['id_pl'] = $id_pl_yt; foreach($val->find('li.channels-content-item') as $val2){ $url_yt = 'http://www.youtube.com'.$val2->find('div.yt-lockup div.yt-lockup-thumbnail a',0)->href; $id_yt = get_youtube_id_from_url($url_yt); $id_yt_encode = bin2hex(str_encode($id_yt, 'ngocgiac')); $title_yt = $val2->find('div.yt-lockup h3.yt-lockup-title a',0)->plaintext; $user_yt = $val2->find('div.yt-lockup div.yt-lockup-byline a',0)->plaintext; $view_yt = $val2->find('div.yt-lockup ul.yt-lockup-meta-info li',0)->plaintext; $list_pl2['id'] = $id_yt; $list_pl2['id_encode'] = $id_yt_encode; $list_pl2['img'] = '//i.ytimg.com/vi/' . $id_yt . '/mqdefault_live.jpg'; $list_pl2['user'] = $user_yt; $list_pl2['view'] = $view_yt; $list_pl2['title'] = $title_yt; $list_pl2['ftitle'] = format_string($title_yt); $arr_list['item'][] = $list_pl2; } $list_video[] = $arr_list; } echo json_encode($list_video); exit(); break; case 'playlist': $img_yt= $title_yt=$user_yt=''; $list = $_GET['list']; $url = 'https://www.youtube.com/playlist?list='.$list; $content = get_content_phim47($url); $html = str_get_html($content); $list2 = array(); foreach($html->find('tr.pl-video') as $val){ $url_yt = 'https://www.youtube.com'.$val->find('.pl-video-thumb a',0)->href; $arr_content['main_title'] = $html->find('title',0)->plaintext; $arr_content['title'] = trim($val->find('.pl-video-title a',0)->plaintext); $arr_content['ftitle'] = format_string($arr_content['title']); $arr_content['url'] = $url_yt; $arr_content['id'] = get_youtube_id_from_url($url_yt); $arr_content['id_encode'] = bin2hex(str_encode($arr_content['id'], 'ngocgiac')); $arr_content['img'] = '//i.ytimg.com/vi/' .$arr_content['id'] . '/mqdefault_live.jpg'; $user_yt = $val->find('.pl-video-owner a',0)->plaintext; $arr_content['user'] = $user_yt; $list2[] = $arr_content; } echo json_encode($list2); //print_r($list2); exit(); break; } ob_end_flush(); exit(); ?>