���� 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/api1.123vid.top/ |
<?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 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 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)); return $outstr; } function curl_func($url,$ref) { $ch = curl_init(); $head[] = 'Host: m.youtube.com'; $head[] = 'User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:77.0) Gecko/20100101 Firefox/77.0'; $head[] = 'Accept: */*'; $head[] = 'Accept-Language: en-US,en;q=0.5'; $head[] = 'Accept-Encoding: gzip'; $head[] = 'x-youtube-sts: 18421'; $head[] = 'x-spf-referer: '.$ref; $head[] = 'X-YouTube-Client-Name: 2'; $head[] = 'X-YouTube-Client-Version: 2.20200612.00.01'; $head[] = 'X-YouTube-Device: cbr=Firefox&cbrand=mozilla&cbrver=77.0&ceng=Gecko&cengver=77.0&cmodel=firefox&cos=Windows&cosver=10.0&cplatform=MOBILE'; $head[] = 'X-YouTube-Page-CL: 316164186'; $head[] = 'X-YouTube-Page-Label: youtube.ytfe.mweb_20200611_0_RC1'; $head[] = 'X-YouTube-Variants-Checksum: d733162d153183fc3d0ca28228a5f040'; $head[] = 'X-YouTube-Utc-Offset: 420'; $head[] = 'X-YouTube-Time-Zone: Asia/Ho_Chi_Minh'; $head[] = 'X-YouTube-Ad-Signals: dt=1592125445976&flash=0&frm&u_tz=420&u_his=2&u_java&u_h=768&u_w=1366&u_ah=728&u_aw=1366&u_cd=24&u_nplug&u_nmime&bc=29&bih=298&biw=1349&brdim=-8%2C-8%2C-8%2C-8%2C1366%2C0%2C1382%2C744%2C1366%2C298&vis=1&wgl=true&ca_type=image'; $head[] = 'Connection: keep-alive'; $head[] = 'Referer: '.$ref; $head[] = 'Cookie: VISITOR_INFO1_LIVE=fQJoDmD2uIM; _ga=GA1.2.132832653.1582794066; PREF=app=m; CONSENT=YES+VN.vi+20170312-18-0; YSC=f7ClEVxjn-o; GPS=1; ST-jkdtvv=itct=CBkQybcCIhMI5LTl1vmA6gIVjAVgCh3fpg-9'; $head[] = 'Pragma: no-cache'; $head[] = 'Cache-Control: no-cache'; $head[] = 'TE: Trailers'; /*$head[] = "Connection: keep-alive"; $head[] = "Keep-Alive: 300"; $head[] = "Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7"; $head[] = "Accept-Language: en-us,en;q=0.5";*/ curl_setopt($ch, CURLOPT_USERAGENT, 'User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:77.0) Gecko/20100101 Firefox/77.0'); curl_setopt($ch, CURLOPT_HTTPHEADER, $head); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_REFERER, $ref); curl_setopt($ch, CURLOPT_COOKIEJAR, 'cookies-m-youtube-cn-com.txt'); curl_setopt($ch, CURLOPT_COOKIEFILE, 'cookies-m-youtube-cn-com.txt'); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, FALSE); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE); curl_setopt($ch, CURLOPT_TIMEOUT, 60); curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 60); curl_setopt($ch, CURLOPT_FOLLOWLOCATION, TRUE); curl_setopt($ch,CURLOPT_ENCODING , "gzip"); $page = curl_exec($ch); curl_close($ch); return $page; } $token = $_GET['token']; $ref = base64_decode($_GET['ref']); if(strpos($ref,'?')===false) { $url = $ref . '?ctoken=' . $token . '&pbj=1'; }else{ $url = $ref . '&ctoken=' . $token . '&pbj=1'; } //$url ='https://m.youtube.com/user/TrifinnTV/videos?ctoken=4qmFsgI0EhhVQ3pOaG93cHpUNEF3eUlXN1Vua19CNVEaGEVnWjJhV1JsYjNNZ0FEZ0JlZ0V5dUFFQQ%3D%3D&pbj=1'; $content = curl_func($url,$ref); $data = json_decode($content,true); print_r($data); exit(); $detail['continuation'] = $data['response']['continuationContents']['itemSectionContinuation']['continuations']['0']['nextContinuationData']['continuation']; $detail['ref'] = base64_encode($ref); $detail['videos'] = array(); $i=0; foreach($data['response']['continuationContents']['itemSectionContinuation']['contents'] as $key=>$val){ $detail['videos'][$i]['title'] = $val['compactVideoRenderer']['title']['runs']['0']['text']; $detail['videos'][$i]['id'] = $val['compactVideoRenderer']['videoId']; //$detail['videos'][$i]['img'] = $val['compactVideoRenderer']['thumbnail']['thumbnails']['3']['url']; $detail['videos'][$i]['img'] = '//i.ytimg.com/vi/' . $detail['videos'][$i]['id'] . '/mqdefault.jpg'; $detail['videos'][$i]['duration'] = $val['compactVideoRenderer']['lengthText']['runs']['0']['text']; $detail['videos'][$i]['id_you_encode'] = bin2hex(str_encode($detail['videos'][$i]['id'], 'ngocgiac')); $detail['videos'][$i]['ftitle'] = format_string($detail['videos'][$i]['title']); $i++; } header('Access-Control-Allow-Origin: https://123vid.top'); echo json_encode($detail); exit(); print_r($detail); exit(); echo $content; exit(); ?>