Online Loans - Cheap Car Insurance - Power Rangers - Debt Help - Flights

PDA

View Full Version : Adding an RSS/XML feed


schlottke
Apr 13th 2004, 2:34 pm
If I wanted to have a blank page that simply brought this link into it:

http://newstrove.com/cgi-bin/RSS.XML?search=college+wrestling&title=wrestling%20news&max_results=100&publisher_rank=0&quality_filter=BEST

<?php
//this is your newsfeed , you can use any rss file here
$xmlfile = fopen("http://newstrove.com/cgi-bin/RSS.XML?search=college+wrestling&title=wrestling%20news&max_results=100&publisher_rank=0&quality_filter=BEST", "r");
//if file doesnt exist , quit
if(!$xmlfile)die("cannot open the xml file");
//read in 40000 bytes of the $xmlfile
$readfile = fread($xmlfile ,40000);
//search for the
$searchfile = eregi("<item>(.*)</item>", $readfile ,$arrayreg);
$filechunks = explode("<item>", $arrayreg[0]);
$count = count($filechunks);
//build our table
echo "<table border='1'>";
//display our heading
echo "<th colspan='2'>latest news</th>";
for($i=1 ; $i<=$count-1 ;$i++)
{
ereg("<title>(.*)</title>",$filechunks[$i], $title);
ereg("<link>(.*)</link>",$filechunks[$i], $links);
echo "<tr><td>";
//display all the titles
echo $title[1];
echo "</td><td>";
//display all the links
echo "<a href ='$links[1]'\>$links[1]</a>";
echo "</td></tr>";
}
echo "</table>";
?>

Would this be the best way to do it?

digitalpoint
Apr 13th 2004, 2:40 pm
No formatting or anything?

- Shawn

schlottke
Apr 13th 2004, 3:15 pm
It is loading about 75 articles and takes forever to load right now.. I can't seem to find a way for it to speed up, my question was just if this was the quickest way to get from point A (XML) to point b (html)

digitalpoint
Apr 13th 2004, 4:04 pm
Well an RSS feed you would want to save to a file once every so often (like every 30 minutes or something). Otherwise it will be slow and put a strain on the server you are getting it from.

- Shawn

rhastman
Apr 13th 2004, 4:24 pm
Is there a way in ASP to automate that? (saving the RSS feed results into an HTML page)

Thanks

rfuess
Jun 15th 2004, 11:44 pm
You could use an XSL style sheet in ASP (or ASP.Net) to translate it. There would be a simpler script to call the translation onto the feed.

If this interests you, let me know and I will work out an initial XSL and the ASP script. (I should get a reply to this, or email me at robertfuess@spiderweblogic.com) I will put the reply here.

If you are interested in asp, which flavor do you prefer, the older VB asp, or ASP.net? If ASP.net, do you prefer VB.Net or C#?

rfuess
Jun 15th 2004, 11:48 pm
Saving the file is a viable option, especially if you plan on storing it later for archive or auditing purposes. If you don't need any of the old ones, you could also have an XML web service that is cached every 30 minutes or so get the data. (I could do that if you like ASP.Net)

That way you wouldn't have to clean up old files on the server, not that it takes much coding to do so.

Lots of ways to skin the cat.

Tell me what you want.

Nitin M
Jun 18th 2004, 11:28 pm
You may already be aware, but in case not ... a warning on RSS feeds...

They really suck the PR out of the page you are putting it on. Make sure you think it really is of great value to your web visitors because it drains PR and can drain traffic away as well.

I have seen people put RSS feeds on their homepage and their PR, SERPS, and Page Views all take a nasty beating.

Sometime people think "cool - easy free content to make my site look bigger", but the price you pay for it is HUGE. Just food for thought.

Atlanta Realtor
Jun 20th 2004, 9:44 pm
You may already be aware, but in case not ... a warning on RSS feeds...

They really suck the PR out of the page you are putting it on. Make sure you think it really is of great value to your web visitors because it drains PR and can drain traffic away as well.

I have seen people put RSS feeds on their homepage and their PR, SERPS, and Page Views all take a nasty beating.

Sometime people think "cool - easy free content to make my site look bigger", but the price you pay for it is HUGE. Just food for thought.

Why has this site done so well with it then www.atlantanation.com/

Nitin M
Jun 20th 2004, 10:33 pm
What is going on with the XXXXnation.com sites is a whole different ball of wax.

You know it is likely hundreds of sites, right?

www . cherokeenation.net
www . cobbonline.com
www . cincynation.com
www . dallasnation.com
www . floridanation.com

The list just keeps going, and going, and going.

The reasons for their "success" have nothing to do with the RSS feed. That is just a convenient and easy way to make the site look like it actually has content.

On a "real" website, esp. when put on the homepage, you are funnelling huge amounts of PR out to the destination links.

There are several network sites we are competing with and the "nation" sites, and the areaguides are the most obtrusive. Search on "Find a Realtor" dislpaying 100 at a time and results 80-1000 are 90% from these sites. Of course, their main targets are <city name> real estate, <state> realtor, etc.

Do us all a favor and fill out a google report on them all --- hopefully with enough reports, google will take action!

<EDIT>
Now, based on what is happening with the forums pages ranking so high and because we know blogs always have high SERPs, I will say it is entirely possible that site freshness not only impacts how frequently the google spider visits, but potentially it also gives added weight to SERP's.

<sigh> Yet more testing to do.

whiterabbit
Jun 22nd 2004, 8:57 am
Last year I found a fabulous asp script from sofotex that works with just about any rss feed, unfortunately, I can't post the url or the code here (not til' I've made another few posts)

I've got it sitting on a site, so pm me for its (highly secret;)location)

Server Requirements:
XMLDOM
FSO
Folder write permission (anonymous) for storing the cached xml
ASP 2 or greater

It won't work without all of the above!

Tony

digitalpoint
Jun 22nd 2004, 8:57 am
There actually is not anything preventing you from posting code or the URL.

whiterabbit
Jun 22nd 2004, 9:02 am
The following errors occurred when this message was submitted:
Live links and signatures are not available until you have 10 total posts.



Tony

digitalpoint
Jun 22nd 2004, 9:04 am
You can use links, just not live links (ones that are clickable).

Geir
Jun 22nd 2004, 9:43 am
You can use links, just not live links (ones that are clickable).

Even if you just type in the URL, it will become a live link. However, once you get the warning you can delete the tags around the URL and submit the post, and the URL will be posted (but not clickable).

:) Geir

whiterabbit
Jun 22nd 2004, 9:55 am
OK, Thanks, still getting my head around vBulletin

Server Requirements:
XMLDOM
FSO
ASP 2 or greater
Anonymous write permission on one folder to store the xml file

http://www.exogenetic.com/newsfeed.htm

The code isn't mine, I just use it mercilessly :D

Any problems and I'll do my best to help

Tony

TwisterMc
Jul 7th 2004, 11:47 am
So did anyone figure out an easy way to add an RSS feed? What I want to do is pull the top 5 posts off my bloger.com blog and show them on my home page as headline links. Shouldn't be that hard... or is it?

digitalpoint
Jul 7th 2004, 11:51 am
I think Blogger has an option to build an RSS feed automatically, doesn't it?

TwisterMc
Jul 7th 2004, 11:58 am
Yep got that. now how do i get the top 5 on my home page? :)

digitalpoint
Jul 7th 2004, 12:03 pm
Well you would need to do a little coding... check hotscripts.com for lots of RSS feed readers/formatters.

l0cke
Jul 7th 2004, 12:17 pm
Something of note.. Blogger uses Atom feeds. You will either have to parse the atom.xml file or convert it to an RSS feed and parse the resulting file. I would recommend parsing the atom.xml file.

TwisterMc
Jul 7th 2004, 12:49 pm
thanks i'll see what i can find :)

Owlcroft
Jul 7th 2004, 10:36 pm
I will say it is entirely possible that site freshness not only impacts how frequently the google spider visits, but potentially it also gives added weight to SERP's.
You betchum, Red Ryder.

That principle is widely believed true, and--amazingly for Google--it makes sense. Pages with content that changes frequently are at least likely (not certainly, but likely) serving ever new and fresh information, so it makes sense that they would be more "relevant" for a given term than, to make a simple comparison, the same page with no changes.

<plug>

It is for that reason that I, among many, feel it important for every page of a site to have some legitimate, relevant content that changes frequently, and that was the drive behind the various free items on the SEO Tools, Toys, and Packages Site (http://seo-toys.com/), which items are designed to accomplish just those ends.

For a real-estate-based site, a perfectly reasonable example of relevant content that necessarily changes often is a weather report for the appropriate area, hence the "Weather" drop-in module (http://seo-toys.com/weather-seo-tool/weather-tool.shtml), already in use on some RE-based sites. Also, the "Freebie" package (http://seo-toys.com/freebie-seo-package/freebie-package.shtml), which adds several thousand apparently static but actually dynamic pages to any site, can be used for book titles relevant to real estate in general, or to the area in question (it, too, is in use on some RE sites).

(Moreover, some of these give one lots of internal links back to one's own front page.)

</plug>

RSS feeds may be important for some sites and pages, but it's always nice to have internal changing content that is 100% under one's own control.

payoutwindow
Jul 7th 2004, 11:45 pm
I am gonna go back to something mentioned earlier in the thread but I feel was not fully address or not real consensus was reached.

The PR Drain Issue :confused:

I am considering running an RSS feed, with say 5-10 headline stories linking back to the external sources.

These will be on my front page, and possible the only external pointing links on the front page.

Is the PR drain really going to be a factor as all 5-10 links in total will be pointing to one domains at the end of the day??