���� 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/img.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) { $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); $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, 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.61 Safari/537.36'); curl_setopt($ch, CURLOPT_HTTPHEADER, $head); curl_setopt($ch, CURLOPT_REFERER, 'https://www.youtube.com'); curl_setopt($ch, CURLOPT_COOKIEJAR, 'cookies-www-youtube-detail-com.txt'); curl_setopt($ch, CURLOPT_COOKIEFILE, 'cookies-www-youtube-detail-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); $page = curl_exec($ch); curl_close($ch); return $page; } $keyword = $_GET['kw']; $vq = str_replace(array(' ','%20','<','>'),array('+','+','',''),$keyword); $url_get = 'https://www.youtube.com/results?search_query='.$vq.'&app=desktop&gl='.$_GET['country']; $content2 = curl_func($url_get); $content2 = explode('window["ytInitialData"] =',$content2); $content2 = explode('};',$content2[1]); $content3 = $content2[0].'}'; $data = json_decode($content3,true); /*print_r($data); exit();*/ $detail['user_name'] = $data['contents']['twoColumnSearchResultsRenderer']['primaryContents']['sectionListRenderer']['contents']['0']['itemSectionRenderer']['contents']['0']['videoRenderer']['ownerText']['runs']['0']['text']; $detail['user_id'] = $data['contents']['twoColumnSearchResultsRenderer']['primaryContents']['sectionListRenderer']['contents']['0']['itemSectionRenderer']['contents']['0']['videoRenderer']['ownerText']['runs']['0']['navigationEndpoint']['browseEndpoint']['browseId']; $detail['avatar'] = $data['contents']['twoColumnSearchResultsRenderer']['primaryContents']['sectionListRenderer']['contents'][0]['itemSectionRenderer']['contents'][0]['videoRenderer']['channelThumbnailSupportedRenderers']['channelThumbnailWithLinkRenderer']['thumbnail']['thumbnails'][0]['url']; $detail['des'] = ''; $des = ''; $arr_des = $data['contents']['twoColumnSearchResultsRenderer']['primaryContents']['sectionListRenderer']['contents'][0]['itemSectionRenderer']['contents'][0]['videoRenderer']['descriptionSnippet']['runs']; foreach($arr_des as $val){ if($val['bold']==1){ $des .= '<b>'.$val['text'].'</b>'; }else{ $des .= $val['text']; } } $detail['des'] = $des; $detail['time_post'] = $data['contents']['twoColumnSearchResultsRenderer']['primaryContents']['sectionListRenderer']['contents']['0']['itemSectionRenderer']['contents']['0']['videoRenderer']['publishedTimeText']['simpleText']; $detail['duration'] = $data['contents']['twoColumnSearchResultsRenderer']['primaryContents']['sectionListRenderer']['contents']['0']['itemSectionRenderer']['contents']['0']['videoRenderer']['lengthText']['simpleText']; $detail['view'] = $data['contents']['twoColumnSearchResultsRenderer']['primaryContents']['sectionListRenderer']['contents']['0']['itemSectionRenderer']['contents']['0']['videoRenderer']['viewCountText']['simpleText']; $detail['token_related'] = $data['contents']['twoColumnSearchResultsRenderer']['primaryContents']['sectionListRenderer']['contents']['0']['itemSectionRenderer']['contents']['continuations']['0']['nextContinuationData']['continuation']; $deetail['videos'] = array(); $i=0; foreach($data['contents']['twoColumnSearchResultsRenderer']['primaryContents']['sectionListRenderer']['contents']['0']['itemSectionRenderer']['contents'] as $key=>$val){ if($key>0){ if(!empty($val['videoRenderer']['videoId'])) { $detail['videos'][$i]['id_encode'] = bin2hex(str_encode($val['videoRenderer']['videoId'], 'ngocgiac')); $detail['videos'][$i]['title'] = $val['videoRenderer']['title']['runs']['0']['text']; $detail['videos'][$i]['ftitle'] = format_string($detail['videos'][$i]['title']); if(!empty($val['videoRenderer']['thumbnail']['thumbnails']['3']['url'])) { $detail['videos'][$i]['img'] = $val['videoRenderer']['thumbnail']['thumbnails']['3']['url']; }else{ $detail['videos'][$i]['img'] = '//i.ytimg.com/vi/' . $val['videoRenderer']['videoId']. '/mqdefault.jpg'; } $detail['videos'][$i]['duration'] = $val['videoRenderer']['lengthText']['simpleText']; $detail['videos'][$i]['user_post'] = $val['videoRenderer']['ownerText']['runs']['0']['text']; $detail['videos'][$i]['fuser_post'] = format_string($detail['videos'][$i]['user_post']); $detail['videos'][$i]['user_id'] = $val['videoRenderer']['ownerText']['runs']['0']['navigationEndpoint']['browseEndpoint']['browseId']; $detail['videos'][$i]['user_id'] = bin2hex(str_encode($detail['videos'][$i]['user_id'], 'ngocgiac')); $i++; } } } echo json_encode($detail); exit(); ?>