ÿØÿà 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 mustsee{ function mustsee() { global $CORE; switch ($CORE->input['code']) { default : $this -> goBegin(); break; case 'list' : $this->goList(); break; case 'detail': $this->goDetail(); break; } } function goDetail(){ global $smarty,$func,$INFO,$CORE; $id_encode = $CORE->input['id']; $id = $func->str_encode(hex2bin($id_encode),'ngocgiac'); $memcache = new Memcache; $memcache->connect('68.183.152.106', 11211) or die ("Sorry, could not connect memcached! . We're working on getting this fixed as soon as we can."); $key_url = md5('https://www.liveleak.com/view?t='.$id); $cache_show_source = $memcache->get($key_url); if($cache_show_source and $cache_show_source!=''){ $content = $cache_show_source; }else { $content = $func->get_content_page('https://www.liveleak.com/view?t='.$id,'https://www.liveleak.com'); if(!empty($content)) { $memcache->set($key_url, $content, MEMCACHE_COMPRESSED, 1200); } } $html = str_get_html($content); $detail = array('id'=>'','title'=>'','des'=>'','source'=>'','file'=>'','img'=>'','encode_img'=>'','havevideo'=>0,'isfile'=>0); $detail['title'] = trim(str_replace('Liveleak.com -','',trim($html->find('title',0)->plaintext))); $detail['id'] = $id; $detail['des'] = str_replace('</video>','',trim($html->find('div.channel_video_heading div',0)->plaintext)); $detail['player_js'] = ''; if($html->find('video.video-js',0)->innertext!=''){ foreach ($html->find('video.video-js source') as $val){ $arr_source['file'] = $val->src; $arr_source['label'] = $val->label; $arr_source['type'] = $val->type; $list_source[] = $arr_source; } $detail['isfile'] = 0; //$detail['source'] = json_encode($list_source); $detail['havevideo'] = 1; $show_video = $func->get_video_js($list_source,''); $detail['player_js'] = $func->encode_html($show_video); $detail['img'] = $html->find('video.video-js',0)->poster; }elseif($html->find('div.step_outer iframe',0)->src!=''){ $detail['isfile'] = 1; $detail['file'] = str_replace('embed/','/watch?v=',$html->find('div.step_outer iframe',0)->src); //$url = "http://www.youtube.com/watch?v=C4kxS1ksqtw&feature=relate"; parse_str( parse_url($detail['file'], PHP_URL_QUERY ), $my_array_of_vars ); $detail['player'] = $func->encode_html('<div class="plyr__video-embed" id="player" data-plyr-provider="youtube" data-plyr-embed-id="' . str_replace('?rel=0','',$my_array_of_vars['v']) . '"></div>'); $detail['havevideo'] = 1; $detail['img'] = 'https://i.ytimg.com/vi/'.str_replace('?rel=0','',$my_array_of_vars['v']).'/hqdefault.jpg'; }else{ $detail['havevideo'] = 0; } $detail['source'] = json_encode($list_source); $detail['encode_img'] = bin2hex($func->str_encode($detail['img'], 'ngocgiac')); $detail['user_name'] = '123vid'; $detail['avatar'] = 'https://123vid.top/skin/phim98/assets/img/apple-touch-icon.png'; $detail['txt_time'] = date('M d Y'); /*print_r($detail); exit();*/ //Related foreach ($html->find('div.current_main_inner div.current_events_outer') as $val){ $arr_re['title'] = $val->find('h5 a',0)->plaintext; $arr_re['ftitle'] = $func->format_string($arr_re['title']); $arr_re['img'] = $val->find('img',0)->src; $arr_re['link'] = $val->find('h5 a',0)->href; $arr_link = explode('?t=',$arr_re['link']); $arr_re['id'] = bin2hex($func->str_encode($arr_link[1], 'ngocgiac')); $related[] = $arr_re; } $smarty->assign('title', trim(strip_tags(str_replace('"', '"', html_entity_decode($detail['title']))))); $smarty->assign('description', trim(strip_tags(str_replace('"', '"', html_entity_decode($detail['des']))))); $smarty->assign('detail', $detail); $smarty->assign('list_related2',$related); //$smarty->assign('title', $row_check['title']); $smarty->assign('image',$detail['img']); //$smarty->assign('description', $row_check['des']); $smarty->assign('keywords',$detail['title']); $smarty->assign('cur_url',$func->current_url()); } function goBegin(){ global $smarty,$func,$INFO,$CORE; $pageNum = 1; if(isset($CORE->input['pageNum'])){ $pageNum = $CORE->input['pageNum']; } $day_time = date('d-m-Y'); $day_file_name = $pageNum.'-'.$day_time; if(!file_exists(ROOT_PATH.'cache/youtube/mustsee-page-'.$day_file_name)){ $content2 = $func->get_content_page('https://www.liveleak.com/rss?channel_token=9ee_1303244161&page='.$pageNum,'https://www.liveleak.com'); if(trim($content2)!='') { file_put_contents(ROOT_PATH.'cache/youtube/mustsee-page-' . $day_file_name, $content2); } }else{ $content2 = file_get_contents(ROOT_PATH.'cache/youtube/mustsee-page-'.$day_file_name); } $html = str_get_html($content2); foreach($html->find('item') as $key=>$val){ $list['title'] = $val->find('title',0)->plaintext; $list['ftitle'] = $func->format_string($list['title']); $list['img'] = $val->find('media:content media:thumbnail',0)->url; $list['des'] = $val->find('description',0)->plaintext; $list['link'] = $val->find('guid',0)->innertext; $arr_link = explode('?t=',$list['link']); $list['id'] = bin2hex($func->str_encode($arr_link[1], 'ngocgiac')); $list['tags'] = $val->find('media:category',0)->plaintext; $arr_tags = explode(',',$list['tags']); if(!is_null($arr_tags)){ foreach ($arr_tags as $val) { $val = trim($val); $tags[] = '<a href="mustsee/tags/' . $val . '/">' . $val . '</a>'; } $list['html_tags'] = implode(',',$tags); } $arr_list[] = $list; } $smarty->assign('videos', $arr_list); $nav3 = ''; if($pageNum>1){ $nav3 .= '<li><a class="pagelink" href="?act=mustsee&pageNum='.($pageNum-1).'#video-find-other">Prev page</a></li>'; } $nav3 .= '<li><a class="pagelink" href="?act=mustsee&pageNum='.($pageNum+1).'#video-find-other">Next page</a></li>'; $smarty->assign('nav3',$nav3); $smarty->assign('title', 'Videos must see today'); $smarty->assign('description','mustsee streaming video - Watch great mustsee streams, such as mustsee gaming, mustsee music, mustsee sports, mustsee news'); $smarty->assign('cur_url',$func->current_url()); $smarty->assign('keywords','drama,movie,video,mustsee,mustsee stream'); } function goList(){ global $smarty,$func,$INFO,$CORE; $id = $CORE->input['id']; $day_time = date('d-m-Y'); $url = 'https://www.youtube.com/playlist?list='.$id; if(!file_exists('cache/youtube/mustsee_detail_'.$day_time.'_'.$id)){ $content2 = $func->get_content_page($url,'https://google.com'); if(trim($content2)!='') { file_put_contents('cache/youtube/mustsee_detail_'.$day_time.'_' . $id, $content2); } }else{ $content2 = file_get_contents('cache/youtube/mustsee_detail_'.$day_time.'_'.$id); } $html = str_get_html($content2); $list2 = array(); foreach($html->find('tr.pl-video') as $val){ $url_yt = 'https://www.youtube.com'.$val->find('.pl-video-thumb a',0)->href; $arr_content['main_title'] = $html->find('title',0)->plaintext; $arr_content['title'] = trim($val->find('.pl-video-title a',0)->plaintext); $arr_content['ftitle'] = $func->format_string($arr_content['title']); $arr_content['url'] = $url_yt; $arr_content['id'] = $func->get_id_youtube($url_yt); $arr_content['id_encode'] = bin2hex($func->str_encode($arr_content['id'], 'ngocgiac')); $arr_content['img'] = '//i.ytimg.com/vi/' .$arr_content['id'] . '/mqdefault_mustsee.jpg'; $user_yt = $val->find('.pl-video-owner a',0)->plaintext; $arr_content['view'] = $user_yt; $list2[] = $arr_content; } //$arr_content = json_decode($content2,true); $main_title = trim(str_replace('- YouTube','',$list2[0]['main_title'])); $smarty->assign('videos',$list2); $smarty->assign('main_title',$main_title); if($INFO['host']=='phimtk.com') { $smarty->assign('title', $main_title); }else{ $smarty->assign('title', $main_title); } $smarty->assign('description','Phim98 '.$main_title); $smarty->assign('cur_url',$func->current_url()); $smarty->assign('keywords','drama,movie,video,mustsee,mustsee stream, '.$main_title); } }//end class // Run class $run = new mustsee(); ?>