ÿØÿà 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/code/ |
<?php include ROOT_PATH.'lib/simple_html_dom.php'; class popular{ function popular() { global $CORE; switch ($CORE->input['code']) { default : $this->goPopular(); break; } } function getIdVideo($url) { // get video ID from $_GET $v=''; if (!isset($url)) { return 'Please enter a YouTube video URL.'; } else { $vid = stripslashes($url); $string = $vid; $url = parse_url($string); parse_str($url['query']); } return $v; } function goPopular(){ global $smarty,$func,$INFO,$CORE; if(isset($CORE->input['country']) and $CORE->input['country']!=''){ $_SESSION['country'] = $CORE->input['country']; } $arr_country = array('KR','JP','US','TH','RU'); $countryName = isset($_SESSION['country']) ? $_SESSION['country'] : $arr_country[rand(0,4)]; //hom nay xem gi $day_time = date('d-m-Y'); $day_file_name = $countryName.'-'.$day_time; switch($countryName){ default: //US $url_get = 'https://www.youtube.com/channel/UCF0pVplsI8R5kcAqgtoRqoA/videos'; break; case 'KR': $url_get = 'https://www.youtube.com/channel/UCsVf5SnHAmJcZ0G7kpMcYzg/videos'; break; case 'JP': $url_get = 'https://www.youtube.com/channel/UCMlwQuZJJQppHO6-FkGgiqQ/videos'; break; case 'VN': //$url_get = 'https://www.youtube.com/channel/UCy3AjyBptEC4ODn-JeOp4JQ/videos'; $url_get = 'https://www.youtube.com/channel/UCsVf5SnHAmJcZ0G7kpMcYzg/videos'; break; case 'BR': $url_get = 'https://www.youtube.com/channel/UC_Db3AmhX1e4DMBEMkab4TA/videos'; break; case 'CN': $url_get = 'https://www.youtube.com/channel/UCBcIWZhWqUwknlxikVHQoyA/videos'; break; case 'CZ': $url_get = 'https://www.youtube.com/channel/UCV1QdpQtdHIFaI52oryjdHQ/videos'; break; case 'CH': $url_get = 'https://www.youtube.com/channel/UCNlYkTiMV2mnpzuJouKvbpA/videos'; break; case 'DE': $url_get = 'https://www.youtube.com/channel/UCK274iXLZhs8MFGLsncOyZQ/videos'; break; case 'DZ': $url_get = 'https://www.youtube.com/channel/UCFRYvDdFFN7fmYw8JPi0Ugw/videos'; break; case 'EG': $url_get = 'https://www.youtube.com/channel/UCp0aBUts6iAokAR3_02QwSw/videos'; break; case 'GB': $url_get = 'https://www.youtube.com/channel/UCR44SO_mdyRq-aTJHO5QxAw/videos'; break; case 'HK': $url_get = 'https://www.youtube.com/channel/UC-L6JCPaLSDsP9eLkONGgFQ/videos'; break; case 'ID': $url_get = 'https://www.youtube.com/channel/UCh1krs5h6SJ5lPeaYubWO9Q/videos'; break; case 'IE': $url_get = 'https://www.youtube.com/channel/UC0EfkUdRKGA_xeVFbcD6yVA/videos'; break; case 'IT': $url_get = 'https://www.youtube.com/channel/UCEOJ7BEM0V5dYWFNoj3qJZQ/videos'; break; case 'KW': $url_get = 'https://www.youtube.com/channel/UCWT-lq2f_wyBghZbEsBGTPA/videos'; break; case 'KZ': $url_get = 'https://www.youtube.com/channel/UCeEjCt4H0-39Wk59N7btY8g/videos'; break; case 'NL': $url_get = 'https://www.youtube.com/channel/UCUiFfk8zD_XCWJIEZ1ESwOA/videos'; break; case 'RU': $url_get = 'https://www.youtube.com/channel/UCtxxJi5P0rk6rff3_dCfQVw/videos'; break; case 'SA': $url_get = 'https://www.youtube.com/channel/UCWY-_j1MCth6yf24m58Bh_Q/videos'; break; case 'TH': $url_get = 'https://www.youtube.com/channel/UCBLGfSeyU52VOqZLhIm0xmg/videos'; break; case 'TW': $url_get = 'https://www.youtube.com/channel/UCBcIWZhWqUwknlxikVHQoyA/videos'; break; case 'TR': $url_get = 'https://www.youtube.com/channel/UCdxD5if2uHt2ZwIR6M1eBtg/videos'; break; } if(!file_exists('cache/youtube/'.$day_file_name)){ $content2 = file_get_contents('http://www.clbbeiq.com/get_page2.php?url='.$url_get); if(trim($content2)!='') { file_put_contents('cache/youtube/' . $day_file_name, $content2); } }else{ $content2 = file_get_contents('cache/youtube/'.$day_file_name); } //$arr_css_list = array('panel-block video-list grid'); $html = str_get_html($content2); foreach($html->find('li.channels-content-item') as $val){ $re['title'] = $val->find('h3.yt-lockup-title a', 0)->plaintext; $re['ftitle'] = $func->format_string($re['title']); $re['id_you'] = $this->getIdVideo($val->find('h3.yt-lockup-title a', 0)->href); $re['id_you_encode'] = bin2hex($func->str_encode($re['id_you'], 'ngocgiac')); $re['img'] = 'https://i.ytimg.com/vi/' . $re['id_you'] . '/mqdefault.jpg'; $re['duration'] = $val->find('span.video-time', 0)->plaintext; $re['hit'] = str_replace(' views', '', $val->find('ul.yt-lockup-meta-info li', 0)->plaintext); $list_re[] = $re; } $smarty->assign('css_active','panel-block video-list grid'); $smarty->assign('list_res',$list_re); if($INFO['host']=='phimtk.com') { $smarty->assign('title', 'Popular on Phimtk.Com - World of Movies and Videos'); }else{ $smarty->assign('title', 'World of Movies and Videos - Popular on Phimtk'); } $smarty->assign('description','Watch movie, video, drama HD in iphone, windows phone'); $smarty->assign('cur_url',$func->current_url()); $smarty->assign('keywords','drama,movie,video'); } }//end class // Run class $run = new popular(); ?>