ncyoung.com

You are here: Top->My Software->RSS


PHP library for doing RSS client tasks.
description | source | download

update: javascript output added to RSS library

My rssClient library (description |source |download) now supports a really simple way to add syndicated content to a page.

You can use my library as a web service without even downloading the script. A URL like this:

http://ncyoung.com/feeds/rssClient.php?url=http://slashdot.org/slashdot.rdf

will give a set of JavaScript write statements outputting the feed formatted in HTML. Use this as the src parameter in a script tag on your page and it will print onto the page:

<script language="JavaScript" src="http://ncyoung.com/feeds/rssClient.php?url=http://slashdot.org/slashdot.rdf">
</script>

You can see this in action below.




View the source and you won't see the table or any of the slashdot content, it's all plunked in by your browser.

(the sample code above uses the slashdot rss feed. Paste in any valid RSS source to see that instead.

I have to add a footnote here, though maybe it should be the headline of this story: Most often, web services are used by the server side scripts, and integrated with the output before being sent to the browser. This example turns that inside out, with the browser itself calling a web service specified by the page author.

New code downloads

Added my RSS libraries to code downloads. I use it to load the random feed on the sidebar of my home page: ncyoung.com.



You can see all the feeds I have in rotation now at:



http://ncyoung.com/feeds/rssClient.php?all=1