I am just wondering how those site like http://www.topix.net/ display feed from diffirent news site. What kind of script they are using? Is there a free script out there? Thanks
if u r looking for custom coding in php i can help you. see my website. it uses feeds. but let me not stick to my service advertisement. feed parsing can be done by php libraries like magpress. or parsing the file directly through file handling routines (bit tough). you can get it done in no time if u know how to.
You can do this with Magpie, pretty simple. Here's what you can do - keep in mind this is off the top of my head, there may be a mistake or two in here. - Download Magpie from http://magpierss.sourceforge.net, unpack it to a directory off your root called "rss". - Create a directory off your root called "cache", chmod it to 777. Simple PHP code: <?php require_once('rss/rss_fetch.inc'); $news_feed = ''; error_reporting(E_ERROR); $rss = fetch_rss("http://www.url-of-the-rss-feed.com"); $items = array_slice($rss->items, 0); foreach ($items as $item ) { $news_feed .= '<a href="' . $item['link'] . '" target=_blank>' . $item['title'] . '</a><br />' . $item['summary'] . '<br />'; } ?> Code (markup): Sorry for the crappy code. ;-) Your rss data will be formatted and placed in the variable "$news_feed". You can do this multiple times for different feeds. Also, since Magpie caches the data, you won't be hammering the feed source every time your page is loaded. I use a similar method for getting data from a bunch of sources, a random selection of them are displayed on each page on the bottom of this site: www.TheSEOKing.com. Everything that's in the cache is displayed on this page: www.theseoking.com/news.php
I tried adding a Google news feed to my site, bu there's some problem with it URL. For example http://www.eslgo.com/travel/ works fine with but when I tried changing the url and putting on my MT 2.64 blog, it no longer worked. (the new url was http://news.google.com/news?hl=en&ned=us&ie=UTF-8&q=car+insurance&output=rss) So my question is can someone help me get this Google news rss going on my MT 2.64 blog? <?php $insideitem = false; $tag = ""; $title = ""; $description = ""; $link = ""; function startElement($parser, $name, $attrs) { global $insideitem, $tag, $title, $description, $link; if ($insideitem) { $tag = $name; } elseif ($name == "ITEM") { $insideitem = true; } } function endElement($parser, $name) { global $insideitem, $tag, $title, $description, $link; if ($name == "ITEM") { printf("<dt><b><a href='%s'>%s</a></b></dt>", trim($link),htmlspecialchars(trim($title))); printf("<dt>%s</dt><br><br>",htmlspecialchars(trim($description))); $title = ""; $description = ""; $link = ""; $insideitem = false; } } function characterData($parser, $data) { global $insideitem, $tag, $title, $description, $link; if ($insideitem) { switch ($tag) { case "TITLE": $title .= $data; break; case "DESCRIPTION": $description .= $data; break; case "LINK": $link .= $data; break; } } } $xml_parser = xml_parser_create(); xml_set_element_handler($xml_parser, "startElement", "endElement"); xml_set_character_data_handler($xml_parser, "characterData"); $fp = fopen("http://news.google.com/news?hl=en&ned=us&ie=UTF-8&q=car+insurance&output=rss","r") or die("Error reading RSS data."); while ($data = fread($fp, 4096)) xml_parse($xml_parser, $data, feof($fp)) or die(sprintf("XML error: %s at line %d", xml_error_string(xml_get_error_code($xml_parser)), xml_get_current_line_number($xml_parser))); fclose($fp); xml_parser_free($xml_parser); ?> Code (markup):
Try RapidFeeds.com (http://www.rapidfeeds.com). It enables you to embedded any RSS/Atom feed on your site.
I recommend this website: http:xml-rss.com It's free and extremely easy. News from any web. Paste it on your web page or facebook easily.
there are lot of rss feed generators...but i did try feed2js. which is good. so you can try : feed2js.org