HEX
Server: Apache
System: Linux msm5694.mjhst.com 3.10.0-1160.119.1.el7.x86_64 #1 SMP Tue Jun 4 14:43:51 UTC 2024 x86_64
User: camjab_ssh (1000)
PHP: 5.3.29
Disabled: NONE
Upload Files
File: /home/httpd/html/baretube.com.new/admin/cronTagcloud.php
<?

include('db.php');

echo "Start";
$exclude = array('the', 'a', 'if', 'com', 'and', 'her', 'with');

$result = dbQuery("SELECT `keywords` FROM `content` WHERE `keywords` != '' AND `enabled` = 1 ORDER BY `record_num` DESC", false);
foreach ($result as $row) {
    unset($arr);
    $arr = explode(',', $row[keywords]);
    foreach ($arr as $i) {
        $allKeywords[] = trim($i);
    }
}

dbQuery("TRUNCATE TABLE `keywords`");
foreach ($allKeywords as $i) {
    $qlower = mysqli_real_escape_string($dbconn, trim($i));
    if (strlen($qlower) > 2 && !in_array($qlower, $exclude)) {
        $result = dbQuery("SELECT `word` FROM `keywords` WHERE `word` = '$qlower'", false);
        if (count($result) < 1) {
            dbQuery("INSERT INTO `keywords` (`word`, `amount`) VALUES ('$qlower',1)");
        } else {
            dbQuery("UPDATE `keywords` SET `amount` = `amount` + 1 WHERE `word` = '$qlower'");
        }
        unset($result);
    }
}
echo "Done";
?>