403Webshell
Server IP : 51.89.169.208  /  Your IP : 3.21.44.134
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/api/v1/business/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /home/yellowleaf/public_html/api/v1/business/insert-business-logo-data.php
<?php
// set time limit to 10 minutes
set_time_limit(600);
$path  = $_SERVER['DOCUMENT_ROOT'];
include $path.'/connect_db.php';
// Get the request body as a JSON string
$request_body = file_get_contents('php://input');

// Decode the JSON string into a PHP array
$_POST = json_decode($request_body, true);

if (isset($_POST['businesses_logo'])) {
    $businesses_logo = $_POST['businesses_logo'];
    
    foreach ($businesses_logo as $key => $business) {
        $adid = addslashes(trim($business['id']));
        $logo = addslashes(trim($business['logo']));
        $logo_type = addslashes(trim($business['logo_type']));
        $status = addslashes(trim($business['status']));
        if ($status == 'SUCCESS') {
            // insert ignore into table businesses_scraped_logo
            $connect->query("INSERT IGNORE INTO `businesses_scraped_logo` SET `adid` = '$adid', `logo` = '$logo', `logo_type` = '$logo_type'") || die($connect->error);
            $connect->query("UPDATE ads SET logo_scrapped = 1, scrapped_status = '$status' WHERE adid = '$adid'") || die("Update error: ".$connect->error);
        }else{
            $connect->query("UPDATE ads SET logo_scrapped = -1, scrapped_status = '$status' WHERE adid = '$adid'") || die("Update error: ".$connect->error);
        }
    }
    echo "success";
}

?>

Youez - 2016 - github.com/yon3zu
LinuXploit