I want to include a RSS FEED from my merchant in my site but I'm not able to do it correctly. I have tried some tutorials found in the net but never was able to make it work. This forum solved a few problems before so I'm posting this here to see if I finally find the solution. Thanks in advance. I mean, what should I do with the code they supplied?
We need a few more details. What platform are you on? What server side technogy are you using? (PHP, ASP, ASP.NET, Java). If you are using PHP setting up an RSS feed can be pretty simple but you'll need to know a little about what you are doing first. Theres a class you can use which will do it for you which is this ... <?php class RSSFeed { function getFeed($site_title, $site_description, $copyright_details, $feed_items, $domain=false){ if (!$domain) $domain = $_SERVER["SERVER_NAME"]; $feed = "<?xml version="1.0" encoding="UTF-8"?> "; $feed .= "<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"> <channel> "; $feed .= "<title>$site_title</title> <description>$site_description</description> <link>http://$domain</link> <copyright>$copyright_details</copyright> "; foreach ($feed_items as $item) { $item["EpochPublishDate"] = date("D, d M Y H:i:s O", $item["EpochPublishDate"]); $feed .= "<item> <guid>http://$domain" . $item["ItemAbsoluteURL"] . "</guid> <title>" . $item["ItemTitle"] . "</title> <description>" . $item["ItemDescription"] . "</description> <link>http://" . $_SERVER["SERVER_NAME"] . $item["ItemAbsoluteURL"] . "</link> <pubDate>" . $item["EpochPublishDate"] . "</pubDate> </item> "; } $feed .= "</channel> </rss>"; return $feed; } } ?> PHP: Thats what I use for my RSS feeds and theres an atom version too. I got it from www.dev-explorer.com/articles/dynamic-rss-feed and theres some more information on there which may help you out. They also offer some advice on atom feeds if you want one of those too. Hope this is somewhere in the ballpark Badger
Thanks for your reply. I have a PHP file and a URL provided by the merchant. What should I do with that? Can I send them to you so you get the information you need from them?