ÿØÿàJFIFÿÛ„ ( %"1"%)+...383,7(-.- 404 Not Found
Sh3ll
OdayForums


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/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /var/www/html/img.123vid.top/yt_cn2.php
<?php
function curl_func($url) {
    $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: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8';
    $head[] = 'Accept-Language: en-US,en;q=0.5';
    $head[] = 'Accept-Encoding: gzip';
    $head[] = 'Connection: keep-alive';
    $head[] = 'Cookie: VISITOR_INFO1_LIVE=fQJoDmD2uIM; _ga=GA1.2.132832653.1582794066; PREF=app=m; CONSENT=YES+VN.vi+20170312-18-0; YSC=pZ3UxPRaYyY';
    $head[] = 'Upgrade-Insecure-Requests: 1';
    $head[] = 'Pragma: no-cache';
    $head[] = 'Cache-Control: no-cache';
    $head[] = 'TE: Trailers';
    curl_setopt($ch, CURLOPT_USERAGENT, '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_REFERER, 'https://m.youtube.com');
    curl_setopt($ch, CURLOPT_URL, $url);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
    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_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;
}
include 'simple_html_dom.php';

$keyword = $_GET['id'];

$check = substr($keyword, 0, 2);
if($check!='UC'){
    $url_get = 'https://m.youtube.com/user/'.$keyword.'/videos?view=0&sort=dd&shelf_id=0';
    $ref = 'https://m.youtube.com/user/'.$keyword.'/videos?view=0&sort=dd&shelf_id=0';
}else {
    $url_get = 'https://m.youtube.com/channel/' . $keyword . '/videos?view=0&sort=dd&shelf_id=0';
    $ref =  'https://m.youtube.com/channel/' . $keyword . '/videos?view=0&sort=dd&shelf_id=0';
}

$day_time = date('m-Y');
$day_file_name = $keyword.'-'.$day_time;
$content2 = '';
if(!file_exists('cache/youtube/channel-mobile3-'.$day_file_name)){
    $content2 = curl_func($url_get);
    if(trim($content2)!='') {
        file_put_contents('cache/youtube/channel-mobile3-'.$day_file_name, $content2);
    }
}else{
    $content2 = file_get_contents('cache/youtube/channel-mobile3-'.$day_file_name);
}

$html = str_get_html($content2);
$content2 = $html->find('div#initial-data',0)->innertext;
$content2 = str_replace(array('<!--','-->'),array('',''),$content2);
$data = json_decode(trim($content2),true);

$detail['title'] = $data['header']['c4TabbedHeaderRenderer']['title'];
$detail['avatar'] = $data['header']['c4TabbedHeaderRenderer']['avatar']['thumbnails']['2']['url'];
$detail['banner'] = $data['header']['c4TabbedHeaderRenderer']['banner']['thumbnails']['0']['url'];
$detail['des'] = $data['metadata']['channelMetadataRenderer']['description'];
$detail['continuation'] = $data['contents']['singleColumnBrowseResultsRenderer']['tabs']['1']['tabRenderer']['content']['sectionListRenderer']['contents']['0']['itemSectionRenderer']['continuations']['0']['nextContinuationData']['continuation'];
$detail['ref'] = base64_encode($ref);
$detail['videos'] = array();
$i=0;

foreach ($data['contents']['singleColumnBrowseResultsRenderer']['tabs']['1']['tabRenderer']['content']['sectionListRenderer']['contents']['0']['itemSectionRenderer']['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'] = '//i.ytimg.com/vi/' . $detail['videos'][$i]['id'] . '/mqdefault.jpg';
    $detail['videos'][$i]['duration'] = $val['compactVideoRenderer']['thumbnailOverlays']['0']['thumbnailOverlayTimeStatusRenderer']['text']['runs']['0']['text'];
    $i++;
}
echo json_encode($detail);
exit();
print_r($detail);
exit();
echo '<a href="https://img.123vid.top/yt_cn_con.php?token='.$detail['continuation'].'&ref='.$detail['ref'].'" target="_blank">continue</a>';
exit();
echo json_encode($detail);
exit();
print_r($detail);
exit();
?>

ZeroDay Forums Mini