The website is read normally on an android device, but it does not work properly on a desktop computer

I dont have an idea. What is the problem. The whole website is made/written in php/JS/html/css/mysql.
There is a few pages with menu. It is responsive website. And works fine
There is a gallery. In menu bar you have few options. Example latest, popular, gallery, etc…
The problem is when you click on “Popular” from android device it opens without problem. But when you click on “Popular” from desktop PC/laptop it opens just gallery.
Just that one page is problem everything else works fine. On mobile, tablet and desktop devices. But just that page is problem.
Please if somebody had a similar problem like that or have an Idea how to solve it.
Regards.
Thanks.

<?php
include "web-config.php";

if(isset($_GET['p'])){
    if(gettype($_GET['p']) != "array"){
        $page = (int)$_GET['p'];
    }else{
        $page = 0;
    }
}else{
    header("location: {$webConfig['webhome']}/popular?p=1");
    $page = 0;
    exit();
}

if($page > 0){
    $finalPage = $page - 1;
    $realPage = $page;
}else{
    $finalPage = 0;
    $realPage = $page;
}
?>
<!DOCTYPE html>
<html lang="en">
<?= webHead($webConfig,"Popular{$realPage}") ?>
</head>
<body>
    <div class="header">
        Popular
    </div>
        
    <div class="main" id="main">
<?= webHeaderNav($webConfig) ?>
<?php

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://e-hentai.org/popular/?page=".); ($realPage + 1);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($ch, CURLOPT_USERAGENT, "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/102.0.5005.63 Safari/537.36");
$exec = curl_exec($ch);
$httpcode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);

if($httpcode == 200 && preg_match("/<div class="glthumb"/",$exec)){
?>
        <div class="main-content">
            <section class="main-tabs">
                <div class="container-fluid">
                    <div class="row">
                        <div class="col-md-12">
                            <div style="text-align:center;">
                                
<script data-cfasync="false" type="text/javascript" src="//brightadnetwork.com/a/display.php?r=5991602"></script>

<!-- JuicyAds v3.0 -->
<script type="text/javascript" data-cfasync="false" async src="https://poweredby.jads.co/js/jads.js"></script>
<ins id="984072" data-width="728" data-height="102"></ins>
<script type="text/javascript" data-cfasync="false" async>(adsbyjuicy = window.adsbyjuicy || []).push({'adzone':984072});</script>
<!--JuicyAds END-->

                            </div>
                            <h2 class="block-title">Popular Gallery</h2>
                            <div class="tab-content" id="pills-tabContent">
                                <div id="pills-additions" class="tab-pane animated fadeInRight show active">
                                    <div class="row">
<?php
    $getLatest = explode("<div class="glthumb"",$exec);
    for($i = 1; $i <= count ($getLatest)-1; $i++){
        if(preg_match("/data-src="/",$getLatest[$i])){
            preg_match("/data-src="(.*?)"/",$getLatest[$i],$getTb);
        }else{
            preg_match("/src="(.*?)"/",$getLatest[$i],$getTb);
        }
        preg_match("/" title="(.*?)"/",$getLatest[$i],$getTtl);
        preg_match("/<a href="(.*?)"/",$getLatest[$i],$getLnk);
        preg_match("/<a href="https://e-hentai.org/g/(.*?)"/",$getLatest[$i],$getLnk);
        
        preg_match("/id="postedpop_(.*?)div></div><div>/",$getLatest[$i],$getDesc);
        preg_match("/>(.*?)<//",$getDesc[1],$getDescFinal);
        if(!preg_match("/.php/",$getLnk[1])){

?>
                                        <div class="col-6 col-sm-6 col-md-4 col-lg-4 col-xl-2">
                                            <div class="video-block">
                                                <div class="video-thumb position-relative thumb-overlay" style="tetx-align:center;">
                                                    <a href="<?= $webConfig['webhome']."/view-gallery?p=1&u=/g/".$getLnk[1] ?>"><img alt="" class="img-fluid" src="<?= $getTb[1] ?>" style="height:167px !important;width:auto;margin:auto;display:block;"></a>
                                                </div>
                                                <div class="video-content">
                                                    <h2 class="video-title"><a href="<?= $webConfig['webhome']."/view-gallery?p=1&u=/g/".$getLnk[1] ?>"><?= $getTtl[1] ?></a></h2>
                                                    <div class="video-info d-flex align-items-center">
                                                        <span class="video-year"><?= $getDescFinal[1] ?></span>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
<?php
        }
    }
?>
                                    </div>
                                                    <?php
                                                    if($realPage == 1){
                                                    ?>
                                                    <a class="btn hvr-sweep-to-right" href="<?= $webConfig['webhome']."/gallery?p=". $realPage ?>" tabindex="0">
                                                        <b><?= $realPage ?></b>
                                                    </a>
                                                    <a class="btn hvr-sweep-to-right" href="<?= $webConfig['webhome']."/gallery?p=". ($realPage + 2) ?>" tabindex="0">
                                                        <?= $realPage+2 ?>
                                                    </a>
                                                    <a class="btn hvr-sweep-to-right" href="<?= $webConfig['webhome']."/gallery?p=". ($realPage + 1) ?>" tabindex="0">
                                                        <?= $realPage+1 ?>
                                                    </a>
                                                    <?php
                                                    }elseif($realPage == 2){
                                                    ?>
                                                    <a class="btn hvr-sweep-to-right" href="<?= $webConfig['webhome']."/gallery?p=". ($realPage - 2) ?>" tabindex="0">
                                                        <?= $realPage-2 ?>
                                                    </a>
                                                    <a class="btn hvr-sweep-to-right" href="<?= $webConfig['webhome']."/gallery?p=". $realPage ?>" tabindex="0">
                                                        <b><?= $realPage ?></b>
                                                    </a>
                                                    <a class="btn hvr-sweep-to-right" href="<?= $webConfig['webhome']."/gallery?p=". ($realPage + 1) ?>" tabindex="0">
                                                        <?= $realPage+1 ?>
                                                    </a>
                                                    <a class="btn hvr-sweep-to-right" href="<?= $webConfig['webhome']."/gallery?p=". ($realPage + 2) ?>" tabindex="0">
                                                        <?= $realPage+2 ?>
                                                    </a>
                                                    <?php
                                                    }else{
                                                    ?>
                                                    <a class="btn hvr-sweep-to-right" href="<?= $webConfig['webhome']."/gallery?p=". ($realPage - 1) ?>" tabindex="0">
                                                        <?= $realPage-1 ?>
                                                    </a>
                                                    <a class="btn hvr-sweep-to-right" href="<?= $webConfig['webhome']."/gallery?p=". ($realPage - 2) ?>" tabindex="0">
                                                        <?= $realPage-2 ?>
                                                    </a>
                                                    <a class="btn hvr-sweep-to-right" href="<?= $webConfig['webhome']."/gallery?p=". $realPage ?>" tabindex="0">
                                                        <b><?= $realPage ?></b>
                                                    </a>
                                                    <a class="btn hvr-sweep-to-right" href="<?= $webConfig['webhome']."/gallery?p=". ($realPage + 2)?>" tabindex="0">
                                                        <?= $realPage+2 ?>
                                                    </a>
                                                    <a class="btn hvr-sweep-to-right" href="<?= $webConfig['webhome']."/gallery?p=". ($realPage + 1) ?>" tabindex="0">
                                                        <?= $realPage+1 ?>
                                                    </a>
                                                    <?php
                                                    }
                                                    ?>
                                </div>
                            </div>
                        <div style="text-align:center;margin-bottom:10px;">
<script data-cfasync="false" type="text/javascript" src="//brightadnetwork.com/a/display.php?r=5991602"></script>

<!-- JuicyAds v3.0 -->
<script type="text/javascript" data-cfasync="false" async src="https://poweredby.jads.co/js/jads.js"></script>
<ins id="984072" data-width="728" data-height="102"></ins>
<script type="text/javascript" data-cfasync="false" async>(adsbyjuicy = window.adsbyjuicy || []).push({'adzone':984072});</script>
<!--JuicyAds END-->
                        </div>
                        </div>
                    </div>
                </div>
            </section>
        </div>
<?php
}else{
?>
                            <div class="col-xl-3 col-lg-4 col-md-6">
                                <h1>Server Busy!</h1>
                                <h6>Please reload the page or Contact the Administrator.</h6>
                            </div>
<?php
}
?>
<?= webMainFooter($webConfig) ?>
<?= webFooterBottom($webConfig) ?>
    </div>
<?= webFooterJS($webConfig) ?>
</body>
</html>