PDA

View Full Version : Need some help here...


JJR512
12-03-2001, 01:28 AM
I have a script that looks up an external page (completely external, as in on some other website) which is an XML/RSS data page. The script then parses the data on that page, and using a template and template_bits system that I came up with, creates a news page. All this works fine.

The thing I can't figure out how to do is show multiple news sources. This script looks up one URL, parses the data there, and that's that. I'd like to be able to specify multiple source documents and have it go through the parse/output process for each one.

I've attached a file that includes the XML parsing code, as well as the two templates I use. Note that in the code file, under the variable $uFile, which specifies the external source, I've listed some other sources. What I'd like is something like what you see here (http://forums.jjr512.com/main_xmlnews.php) (which I know is not very formatted for now, but that's not important yet), only I'd like headlines/links from each source displayed on the page, not just from the one source.

A simple way to do this would be to specify the sources up front, and have the output from all of them on one page. If you could help me do that, that would be fine. But an even cooler way would be to let each member specify what sources they want to see. That would involve either a cookie to keep track of what they want to see, or modifications to the database. This is what I really want, although I realize it's asking for a lot.

Can anybody help me with either method? If you need any further clarification, please let me know.