403Webshell
Server IP : 108.170.25.35  /  Your IP : 3.143.5.248
Web Server : Apache/2
System : Linux gains.winzonesoftech.com 4.18.0-513.24.1.el8_9.x86_64 #1 SMP Mon Apr 8 11:23:13 EDT 2024 x86_64
User : softechwinzone ( 1579)
PHP Version : 8.1.28
Disable Function : exec,system,passthru,shell_exec,proc_close,proc_open,dl,popen,show_source,posix_kill,posix_mkfifo,posix_getpwuid,posix_setpgid,posix_setsid,posix_setuid,posix_setgid,posix_seteuid,posix_setegid,posix_uname
MySQL : OFF  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /home/softechwinzone/public_html/images/gogoanime/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /home/softechwinzone/public_html/images/gogoanime/popular.php
<?php
require_once('./php/info.php'); 
$page = isset($_GET['page']) ? $_GET['page'] : 1;


// Define caching settings
$cacheTime = 60 * 60 * 24 * 2;  // 12 hours for ongoing anime


function getCacheFilePath($baseDir, $url) {
    // Generate a hash of the URL
    $hash = md5($url);
    // Use the first two characters of the hash to determine the subdirectory
    $subdir = substr($hash, 0, 2);

    // Construct the directory path
    $dirPath = $baseDir . $url . '/';

    // Ensure the directory exists
    if (!file_exists($dirPath)) {
        mkdir($dirPath, 0777, true); // Adjust permissions as necessary
    }

    // Return the full cache file path
    return $dirPath . $hash . '.json';
}

function fetchWithCache($baseDirOngoing, $url, $apiUrl, $cacheTime) {
    
    $cacheFileOngoing = getCacheFilePath($baseDirOngoing, $url);

    // Attempt to use the cache first
    $json = false;
    if (file_exists($cacheFileOngoing) && (filemtime($cacheFileOngoing) > (time() - $cacheTime))) {
        if ($json = file_get_contents($cacheFileOngoing)) {
            // Cache is fresh or read successfully
        }
    }
    
    // Fetch from API if no valid cache is found
    if (!$json) {
        $json = file_get_contents($apiUrl);
        $data = json_decode($json, true);
        $cacheTarget = $cacheFileOngoing;
        file_put_contents($cacheTarget, $json);
    }

    // Decode JSON from the selected source
    return json_decode($json, true);
}


// Fetch anime details
$pagination = fetchWithCache(
    "cache/popular/pagination/",
    $page,
    "$apiLink/popularPage?page=$page",
    $cacheTime
);

$json = fetchWithCache(
    "cache/popular/page/",
    $page,
    "$apiLink/popular?page=$page",
    $cacheTime
);






?>
<!DOCTYPE html>
<html>

<head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">

    <link rel="shortcut icon" href="<?=$base_url?>/img/favicon.ico">

    <title>Watch Most Popular Anime SUB/DUB Online free</title>

    <meta name="robots" content="index, follow" />
    <meta name="description" content="Full list of the Most Popular and Must Watch Anime Online Free, with SUBBED and DUBBED. WATCH NOW with no Ads!">
    <meta name="keywords" content="must watch anime, best anime to watch, legendary anime, most popular anime, top anime, anime to watch, Anime Popular">
    <meta itemprop="image" content="<?=$base_url?>/img/logo.png" />

    <meta property="og:site_name" content="Gogoanimex" />
    <meta property="og:locale" content="en_US" />
    <meta property="og:type" content="website" />
    <meta property="og:title" content="Watch Most Popular Anime SUB/DUB Online free" />
    <meta property="og:description" content="Full list of the Most Popular and Must Watch Anime Online Free, with SUBBED and DUBBED. WATCH NOW with no Ads!">
    <meta property="og:url" content="" />
    <meta property="og:image" content="<?=$base_url?>/img/logo.png" />
    <meta property="og:image:secure_url" content="<?=$base_url?>/img/logo.png" />

    <meta property="twitter:card" content="summary" />
    <meta property="twitter:title" content="Watch Most Popular Anime SUB/DUB Online free" />
    <meta property="twitter:description" content="Full list of the Most Popular and Must Watch Anime Online Free, with SUBBED and DUBBED. WATCH NOW with no Ads!" />
    <meta name="referrer" content="origin">


    <link rel="canonical" href="<?=$base_url?><?php echo $_SERVER['REQUEST_URI'] ?>" />
    <link rel="alternate" hreflang="en-us" href="<?=$base_url?><?php echo $_SERVER['REQUEST_URI'] ?>" />



    <link rel="stylesheet" type="text/css" href="<?=$base_url?>/css/style.css" />
    <?php require_once('./php/advertisments/popup.html'); ?>

    <script type="text/javascript" src="<?=$base_url?>/js/libraries/jquery.js"></script>
    <script>
        var base_url = 'https://' + document.domain + '/';
        var base_url_cdn_api = 'https://ajax.gogocdn.net/';
        var api_anclytic = 'https://ajax.gogocdn.net/anclytic-ajax.html';
    </script>
    <script type="text/javascript" src="<?=$base_url?>/js/libraries/main.js?v=6.9" ></script>
    <style>
        
        h3 {
            margin: 8px 0;
        }
        
        ul.items li h3.name {
            line-height: 16px;
            height: 34px;
            overflow: hidden;
        }
        
        ul.items li h3.name a {
            color: #ffc119;
            font-size: 13px;
            font-family: mySecondFont;
        }
    </style>
</head>

<body>
    <div class="clr"></div>
    <div id="wrapper_inside">
        <div id="wrapper">
            <div id="wrapper_bg">
            <?php require_once('./php/include/header.php'); ?>
                <section class="content">
                    <section class="content_left">

                        <div class="main_body">
                            <div class="anime_name anime_movies">
                                <i class="icongec-anime_movies i_pos"></i>
                                <h2>ANIME popular</h2>
                                <div class="anime_name_pagination">
                                    <div class="pagination">
                                        <ul class='pagination-list'><?php echo str_replace("active","selected",$pagination['pagination']) ?>
                                    
                                    </div>
                                </div>
                            </div>
                            <div class="last_episodes">
                            <ul class="items">
                               <?php

                                   foreach($json as $movies)  { 
                               ?>
                                       <li>
                                           <div class="img"><a href="<?=$base_url?>/anime/<?=$movies['animeId']?>" title="Stream <?=$movies['animeTitle']?> online"><img src="<?=$movies['imgUrl']?>" alt="view anime <?=$movies['animeTitle']?>" loading="lazy" /></a>
                                               </div><h3 class="name"><a href="<?=$base_url?>/anime/<?=$movies['animeId']?>" title="watch <?=$movies['animeTitle']?> episodes free"><?=$movies['animeTitle']?></a></h3>
                                               <p class="released"><?=$movies['status']?></p>
                                       </li>
                                <?php } ?>
                            </ul>
                            </div>
                        </div>

                    </section>
                    <section class="content_right">
                    <div class="headnav_center"></div>

                        <div class="clr"></div>
                        <div class="main_body">
                            <div class="main_body_black">
                                <div class="anime_name ongoing">
                                    <i class="icongec-ongoing i_pos"></i>
                                    <h2>RECENT RELEASE</h2>
                                </div>
                                <div class="recent">
                                    <!-- begon -->
                                    <div id="scrollbar2">
                                        <div class="scrollbar">
                                            <div class="track">
                                                <div class="thumb">
                                                    <div class="end"></div>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="viewport">
                                            <div class="overview">
                                            <?php require_once('./php/include/recentRelease.php'); ?>
                                            </div>
                                        </div>
                                    </div>
                                    <!-- tao thanh cuon 1-->
                                </div>
                            </div>
                        </div>
                        <div class="clr"></div>
                        <div id="load_ads_2">
                            <div id="media.net sticky ad" style="display: inline-block">
                            </div>
                        </div>
                        <style type="text/css">
                            #load_ads_2 {
                                width: 300px;
                            }

                            #load_ads_2.sticky {
                                position: fixed;
                                top: 0;
                            }

                            #scrollbar2 .viewport {
                                height: 1000px !important;
                            }
                        </style>
                        <script>
                            var leftamt;
                            function scrollFunction() {
                                var scamt = (document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop);
                                var element = document.getElementById("media.net sticky ad");
                                if (scamt > leftamt) {
                                    var leftPosition = element.getBoundingClientRect().left;
                                    element.className = element.className.replace(/(?:^|\s)fixclass(?!\S)/g, '');
                                    element.className += " fixclass";
                                    element.style.left = leftPosition + 'px';
                                }
                                else {
                                    element.className = element.className.replace(/(?:^|\s)fixclass(?!\S)/g, '');
                                }
                            }
                            function getElementTopLeft(id) {
                                var ele = document.getElementById(id);
                                var top = 0;
                                var left = 0;
                                while (ele.tagName != "BODY") {
                                    top += ele.offsetTop;
                                    left += ele.offsetLeft;
                                    ele = ele.offsetParent;
                                }
                                return { top: top, left: left };
                            }
                            function abcd() {
                                TopLeft = getElementTopLeft("media.net sticky ad");
                                leftamt = TopLeft.top;
                                //leftamt -= 10;
                            }
                            window.onload = abcd;
                            window.onscroll = scrollFunction;
                        </script>
                        <?php require_once('./php/include/sub-category.html'); ?>
                    </section>
                </section>
                <div class="clr"></div>
                <footer>
                    <div class="menu_bottom">
                        <a href="/about-us.html">
                            <h3>Abouts us</h3>
                        </a>
                        <a href="/contact-us.html">
                            <h3>Contact us</h3>
                        </a>
                        <a href="/privacy.html">
                            <h3>Privacy</h3>
                        </a>
                    </div>
                    <div class="croll">
                        <div class="big"><i class="icongec-backtop"></i></div>
                        <div class="small"><i class="icongec-backtop_mb"></i></div>
                    </div>
                </footer>
            </div>
        </div>
    </div>
    <div id="off_light"></div>
    <div class="clr"></div>
    <div class="mask"></div>
        <script type="text/javascript" src="<?=$base_url?>/js/files/combo.js"></script>
    <script type="text/javascript" src="<?=$base_url?>/js/files/video.js"></script>
    <script type="text/javascript" src="<?=$base_url?>/js/files/jquery.tinyscrollbar.min.js"></script>
    <?php include('./php/include/footer.php')?>

    <script>
        if (document.getElementById('scrollbar2')) {
            $('#scrollbar2').tinyscrollbar();
        }
    </script>
</body>

</html>

Youez - 2016 - github.com/yon3zu
LinuXploit