ÿØÿà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/proxy/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /var/www/html/vidoe.top/proxy/api_xvideos.php
<?php
if (substr_count($_SERVER['HTTP_ACCEPT_ENCODING'], 'gzip')){
    ob_start('ob_gzhandler');
}else{
    ob_start();
}
include 'simple_html_dom.php';
function get_content_phim47($url) {
    $header[0] = "Accept: text/xml,application/xml,application/xhtml+xml,";
    $header[0] .= "text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5";
    $header[] = "Cache-Control: max-age=0";
    $header[] = "Connection: keep-alive";
    $header[] = "Keep-Alive: 300";
    $header[] = "Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7";
    $header[] = "Accept-Language: en-us,en;q=0.5";
    $header[] = "Pragma: "; // browsers keep this blank.
    $process = curl_init($url);
    curl_setopt($process, CURLOPT_HTTPHEADER, $header);
    curl_setopt($process, CURLOPT_HEADER, 0);
    curl_setopt($process, CURLOPT_USERAGENT, 'Googlebot/2.1 (+http://www.google.com/bot.html)');
    curl_setopt($process, CURLOPT_COOKIEFILE, 'cookies_xvideos.txt');
    curl_setopt($process, CURLOPT_COOKIEJAR, 'cookies_xvideos.txt');
    curl_setopt($process, CURLOPT_REFERER, 'http://v1vn.com');
    curl_setopt($process, CURLOPT_ENCODING, 'gzip,deflate');
    curl_setopt($process, CURLOPT_TIMEOUT, 5);
    curl_setopt($process, CURLOPT_RETURNTRANSFER, 1);
    $return = curl_exec($process);
    curl_close($process);
    return $return;
}
if(isset($_GET['mode'])){
    $mode = $_GET['mode'];
}
switch($mode){
    case 'list_new':
        $url = 'http://www.xvideos.com/';
        if(isset($_GET['page']) and $_GET['page']>0) {
            $page = $_GET['page'];
            $url = 'http://www.xvideos.com/new/'.$page.'/';
        }
        $content = get_content_phim47($url);
        $html = str_get_html($content);
        foreach($html->find('div.thumbBlock') as $val){
            $list['img'] = $val->find('div.thumb img',0)->src;
            $list['title'] = $val->find('div.thumbInside p a',0)->title;
            $list['duration'] = $val->find('p.metadata span.duration',0)->plaintext;
            $list['duration'] = str_replace(array('(',')'),array('',''),$list['duration']);
            $list['url'] = $val->find('div.thumbInside p a',0)->href;
            if(!empty($list['title']) and !empty($list['url']) and !empty($list['img'])) {
                $lists['video_info'][] = $list;
            }else{
                continue;
            }
        }
        $pagi = $html->find('div.pagination ul li a.nP',1)->href;
        $arr_pagi = explode('/',$pagi);
        $lists['page_next'] =  $arr_pagi[2];
        $pagi2 = $html->find('div.pagination ul li a.nP',0)->href;
        $arr_pagi2 = explode('/',$pagi2);
        $lists['page_prev'] =  $arr_pagi2[2];
        $lists['page_now'] =  $page;
        //category
        foreach($html->find('div#categories ul li') as $val2){
            $list_cat['title'] = $val2->find('a',0)->plaintext;
            $list_cat['url'] = $val2->find('a',0)->href;
            $lists['category'][] = $list_cat;
        }
        echo json_encode($lists);
        exit();
        break;
    case 'search':
        $url = 'http://www.xvideos.com/';
        if(isset($_GET['k'])) {
            $k = $_GET['k'];
            $url = 'http://www.xvideos.com/?k='.$k;
        }else{
            return;
        }
        if(isset($_GET['page']) and $_GET['page']>0) {
            $page = $_GET['page'];
            $url = 'http://www.xvideos.com/?k='.$k.'&p='.$page;
        }
        $content = get_content_phim47($url);
        $html = str_get_html($content);
        foreach($html->find('div.thumbBlock') as $val){
            $list['img'] = $val->find('div.thumb img',0)->src;
            $list['title'] = $val->find('div.thumbInside p a',0)->title;
            $list['duration'] = $val->find('p.metadata span.duration',0)->plaintext;
            $list['duration'] = str_replace(array('(',')'),array('',''),$list['duration']);
            $list['url'] = $val->find('div.thumbInside p a',0)->href;
            if(!empty($list['title']) and !empty($list['url']) and !empty($list['img'])) {
                $lists['video_info'][] = $list;
            }else{
                continue;
            }
        }
        $pagi = $html->find('div.pagination ul li a.nP',1)->href;
        $arr_pagi = explode('p=',$pagi);
        $lists['page_next'] =  $arr_pagi[1];
        $pagi2 = $html->find('div.pagination ul li a.nP',0)->href;
        $arr_pagi2 = explode('p=',$pagi2);
        $lists['page_prev'] =  $arr_pagi2[1];
        $lists['page_now'] =  $page;
        //category
        foreach($html->find('div#categories ul li') as $val2){
            $list_cat['title'] = $val2->find('a',0)->plaintext;
            $list_cat['url'] = $val2->find('a',0)->href;
            $lists['category'][] = $list_cat;
        }
        echo json_encode($lists);
        exit();
        break;
    case 'category':
        $url = 'http://www.xvideos.com/';
        if(isset($_GET['c'])) {
            $c = $_GET['c'];
            $url = 'http://www.xvideos.com/c/qwdwqd-'.$c;
        }else{
            return;
        }
        if(isset($_GET['page']) and $_GET['page']>0) {
            $page = $_GET['page'];
            $url = 'http://www.xvideos.com/c/'.$page.'/qwdqdw-'.$c;
        }
        $content = get_content_phim47($url);
        $html = str_get_html($content);
        foreach($html->find('div.thumbBlock') as $val){
            $list['img'] = $val->find('div.thumb img',0)->src;
            $list['title'] = $val->find('div.thumbInside p a',0)->title;
            $list['duration'] = $val->find('p.metadata span.duration',0)->plaintext;
            $list['duration'] = str_replace(array('(',')'),array('',''),$list['duration']);
            $list['url'] = $val->find('div.thumbInside p a',0)->href;
            if(!empty($list['title']) and !empty($list['url']) and !empty($list['img'])) {
                $lists['video_info'][] = $list;
            }else{
                continue;
            }
        }
        $pagi = $html->find('div.pagination ul li a.nP',1)->href;
        $arr_pagi = explode('/',$pagi);
        $lists['page_next'] =  $arr_pagi[2];
        $pagi2 = $html->find('div.pagination ul li a.nP',0)->href;
        $arr_pagi2 = explode('/',$pagi2);
        $lists['page_prev'] =  $arr_pagi2[2];
        $lists['page_now'] =  $page;
        //category
        foreach($html->find('div#categories ul li') as $val2){
            $list_cat['title'] = $val2->find('a',0)->plaintext;
            $list_cat['url'] = $val2->find('a',0)->href;
            $lists['category'][] = $list_cat;
        }
        echo json_encode($lists);
        exit();
        break;
    case 'detail':

        $url = 'http://www.xvideos.com/video'.$_GET['vid'].'/'.$_GET['ftitle'];
        $content = get_content_phim47($url);
        preg_match('#videoPageWriteRelated\((.*?)\)\;<\/script>#is',$content,$match);
        $item = str_replace(array('id:','u:','i:','t:','d:','r:'),array('"id":','"u":','"i":','"t":','"d":','"r":'),$match[1]);
        echo $item;
        exit();

        break;

}

?>

ZeroDay Forums Mini