Blog' . $GLOBALS['fullDomain'] . 'Lorem ipsum dolor sit amet...Copyright 20xx - 20xx, My Nameen-ushttps://cyber.harvard.edu/rss/index.htmlMon, 04 Jan 2021 00:00:00 CST60Blog'.$GLOBALS['fullDomain'].''; // Loop through the JSON object foreach ($data as $postObject) { // Only load published posts if ($postObject->published == 'Yes') { // Parse the markdown to HTML include_once('_functions/parseMarkdown.php'); $fileLink = str_replace($GLOBALS['fullDomain'] . '/post/', '', $postObject->link); $fileName = 'posts/' . $postObject->id . '-' . str_replace('.html', '.md', $fileLink); $securedHTML = parseMarkdown($fileName); if ($rssCounter == 0) { $rssContents .= '' . date_format(date_create($postObject->created), 'D, d M Y H:i:s T') . ''; $rssCounter = $rssCounter + 1; } $rssContents .= '' . str_replace(['&', '<', '>'], ['&', '<', '>'], $postObject->title) . '' . str_replace(['&', '<', '>'], ['&', '<', '>'], $postObject->author) . '' . str_replace(['&', '<', '>'], ['&', '<', '>'], $postObject->author) . '' . str_replace(['&', '<', '>'], ['&', '<', '>'], $postObject->link) . '' . date_format(date_create($postObject->created), 'D, d M Y H:i:s T') . '' . str_replace(['&', '<', '>'], ['&', '<', '>'], $postObject->link) . 'description . ']]>'; } } $rssContents .= ''; return $rssContents; }