View Full Version : rss display box: get_content()

08-28-2008, 04:37 PM
1) Script Title: RSS Display Box

2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex18/rssdisplaybox/index.htm

3) Describe problem: I've been using the RSS Display Box script on a clients site for a while now, and am quite happy with the results I've received from it so far. however, i'm concerned that it's affecting my bounce rate. (users go to clients site, see link to news article, spend rest of day on CNN.com instead) My solution was to use get_content() and pagination to display the article (while citing the source, and providing a link, of course) but I'm having trouble implementing it. does anyone have an example of get_content() used affectively?

08-28-2008, 11:48 PM
The script parses a XML file in RSS format specifically for its contents, so unless you're able to first use PHP to create an alternate version of the RSS file that contains the entire contents of each feed, there's no easy way to adapt this script to work like so.

At any rate though, I'm certain using get_contents() to display the contents of an entire page on your server would violate the copyright of any site, even if you credit the source.

08-29-2008, 12:15 AM
I wasn't actually using CNN, (it was just an example) and we've got permissions from the sites we use in the reader, so hopefully there wouldn't be any legal issues, but your concern is noted.

This is probably pretty obvious, but I'm a designer and front end guy; I'm working on my XML and PHP skills as I go, but I think I get what you mean about creating an alternate version of the RSS file. Am I mistaken about what get_content() is meant to do? What would be the normal (legal) use for it?

Many thanks for the reply.

08-29-2008, 09:30 PM
Nope, you're not mistaken, get_content() simply grabs the entire contents of any URL for you to do with on your server. In order to use this script to display the entire contents of a page, the idea would be to use get_content() to first generate a RSS file on your server with the <description> element filled with the full text of the page in question. Then the RSS script when it shows a feed would be showing the entire page defined by each feed item, instead of a just a description of it. That's how it would work in theory anyway.