403Webshell
Server IP : 51.89.169.208  /  Your IP : 3.148.107.92
Web Server : Apache
System : Linux ns3209505.ip-198-244-202.eu 4.18.0-553.27.1.el8_10.x86_64 #1 SMP Tue Nov 5 04:50:16 EST 2024 x86_64
User : yellowleaf ( 1019)
PHP Version : 7.4.33
Disable Function : exec,passthru,shell_exec,system
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /home/yellowleaf/public_html/all_scripts/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /home/yellowleaf/public_html/all_scripts/match_active.php
<?php
header('Content-Type: text/html; charset=utf-8');
ini_set('max_execution_time', 300);
$path  = $_SERVER['DOCUMENT_ROOT'];
include_once $path.'/connect_db.php';


$res_listing_query = $connect->query("SELECT `adid`,`cat1`,`cat2`,`cat3` FROM `ads` WHERE `junk`=0 ORDER BY `adid` ASC LIMIT 1");
// $res_listing_query = $connect->query("SELECT `id`,`details` FROM `ads` WHERE `id`=166433");
// $res_listing_query = $connect->query("UPDATE `ads` SET `junk`=0");
// echo "done";
// die();

if($res_listing_query->num_rows > 0){
    echo '<pre>';
    while($row_listing = $res_listing_query->fetch_array(MYSQLI_ASSOC)){
        $adid = $row_listing['adid'];
        $cat1 = strtolower($row_listing['cat1'])." near me";
        $cat2 = strtolower($row_listing['cat2'])." near me";
        $cat3 = strtolower($row_listing['cat3'])." near me";

        $check = 1;

        if(empty($row_listing['cat1']) || empty($row_listing['cat2']) || empty($row_listing['cat3'])){
            echo "<b>adid: </b>{$adid} - (skip) <br><br><br>";
            $connect->query("UPDATE `ads` SET `junk`=1 WHERE `adid`='{$adid}'") || die('Update error: '.$connect->error);
            echo '<meta http-equiv="refresh" content="0">';

        } else{

            echo "<b>adid: </b>{$adid} - ";

            // echo "SELECT * FROM `google_suggest` WHERE MATCH(google_suggest.keyword) AGAINST('{$cat1}', IN BOOLEAN MODE)";
            // echo "SELECT * FROM `google_suggest` WHERE keyword LIKE '$cat1%'";
            // die();

            // $search_query1 = $connect->query("SELECT * FROM `google_suggest` WHERE MATCH(google_suggest.keyword) AGAINST('{$cat1}')");
            $search_query1 = $connect->query("SELECT * FROM `google_suggest` WHERE keyword LIKE '$cat1%'");
            if(! $search_query1->num_rows){
                $check = 0;
                echo "[not found]</br>";
                echo "<b>phrase-cat1: </b>".$row_listing['cat1']."</br>";
                echo "<b>phrase match with: </b>".$cat1."</br>";
                $connect->query("UPDATE `ads` SET cat1='', `junk`=1 WHERE `adid`='{$adid}'") || die('Update error: '.$connect->error);
                echo "<b>cat1 update with: </b>''</br>";
                // die();
            }

            // $search_query2 = $connect->query("SELECT * FROM `google_suggest` WHERE MATCH(google_suggest.keyword) AGAINST('{$cat2}', IN BOOLEAN MODE)");
            $search_query2 = $connect->query("SELECT * FROM `google_suggest` WHERE keyword LIKE '$cat2%'");
            if(! $search_query2->num_rows){
                $check = 0;
                echo "[not found]</br>";
                echo "<b>phrase-cat2: </b>".$row_listing['cat2']."</br>";
                echo "<b>phrase match with: </b>".$cat2."</br>";
                $connect->query("UPDATE `ads` SET cat2='', `junk`=1 WHERE `adid`='{$adid}'") || die('Update error: '.$connect->error);
                echo "<b>cat2 update with: </b>''</br>";
                // die();

            }

            // $search_query3 = $connect->query("SELECT * FROM `google_suggest` WHERE MATCH(google_suggest.keyword) AGAINST('{$cat3}', IN BOOLEAN MODE)");
            $search_query3 = $connect->query("SELECT * FROM `google_suggest` WHERE keyword LIKE '$cat3%'");
            if(! $search_query3->num_rows){
                $check = 0;
                echo "[not found]</br>";
                echo "<b>phrase-cat3: </b>".$row_listing['cat3']."</br>";
                echo "<b>phrase match with: </b>".$cat3."</br>";
                $connect->query("UPDATE `ads` SET cat3='', `junk`=1 WHERE `adid`='{$adid}'") || die('Update error: '.$connect->error);
                echo "<b>cat3 update with: </b>''</br>";
                // die();
            }

            if($check){
                echo "[found]</br></br></br>";
                echo "<b>phrase-cat1: </b>".$row_listing['cat1']."</br>";
                echo "<b>phrase match with: </b>".$cat3."</br></br>";

                echo "<b>phrase-cat2: </b>".$row_listing['cat2']."</br>";
                echo "<b>phrase match with: </b>".$cat3."</br></br>";

                echo "<b>phrase-cat3: </b>".$row_listing['cat3']."</br>";
                echo "<b>phrase match with: </b>".$cat3."</br></br>";
            } 
            // else {
            //     // echo "[not found]</br></br></br>";
            //     $connect->query("UPDATE `ads` SET `junk`=1 WHERE `adid`='{$adid}'") || die('Update error: '.$connect->error);
            //     // echo '<meta http-equiv="refresh" content="0">';
            //     die();
            // }

            $connect->query("UPDATE `ads` SET `junk`=1 WHERE `adid`='{$adid}'") || die('Update error: '.$connect->error);

            echo '<meta http-equiv="refresh" content="0">';
        }

        
    }
} else{
    echo "All completed";
}

Youez - 2016 - github.com/yon3zu
LinuXploit