prepareQuery(); $table = $config->sql_tablename_publish_de(); header("Content-Type: text/xml; charset=UTF-8"); header("Expires: on, 01 Jan 1970 00:00:00 GMT"); header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT"); header("Cache-Control: no-store, no-cache, must-revalidate"); header("Cache-Control: post-check=0, pre-check=0", false); header('X-UA-Compatible: IE=edge,chrome=1'); header("Pragma: no-cache"); $rss = new RSS2Writer( 'Disruptive Technology Trends', //Feed Title 'Build your Business with www.OneTOPP.com', //Feed Description 'https://blog.onetopp.com/rss.php', //Feed Link 6, //indent false //Use CDATA ); $rss->addCategory("RSS Feed"); $rss->channelImage("StartPage", "https://blog.onetopp.com", "https://cdn.onetopp.com/image/logob.png", 144, 106); $stmt = $pdo->prepare("SELECT * FROM $table WHERE id>=0 AND p_isonline=1 ORDER BY p_timestamp DESC LIMIT 10000"); // AND p_online=1 $stmt->execute(); while($rows = $stmt->fetch(PDO::FETCH_ASSOC)) { $shortcode = $rows["p_shortcode"]; $headline = $rows["p_headline"]; $pic_desc = $rows["p_picture_1_description"]; $hashtag = str_replace("#","",$rows["p_hashtag"]); if (!empty($hashtag)){ $hashtag = "#".$hashtag; } else { $hashtag = ""; } $linkingcode = "https://blog.onetopp.com/".$func->makeArticleLink($shortcode); $rss->addItem("$headline", $pic_desc, $linkingcode); } echo $rss->getXML(); $stmt = null; // doing this is mandatory for connection to get closed $pdo = null; exit(0); ?>