Announcement

Collapse
No announcement yet.

Creating my own page w/ RSS. Need help

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Creating my own page w/ RSS. Need help

    Hello everyone! Hopefully I'm in the right forum

    What I'm trying to do is setup my own vb powered page with RSS feeds on it. Now I created my php file and the template. You can view it here:

    http://forums.winforums.org/technews.php

    I'm using Magpie to parse the RSS. Now I have a file called technewsdata.php which is called from a varible in my phpinclude_start template.

    technewsdata.php
    PHP Code:
    <?

    require_once 'rss_fetch.inc';

    $url = 'http://rssnewsapps.ziffdavis.com/tech.xml';
    $rss = fetch_rss($url);

    echo
    "Site: ", $rss->channel['title'], "<br>\n";
    foreach (
    $rss->items as $item ) {
    $title = $item[title];
    $url = $item[link];
    echo
    "<a href=$url>$title</a></li><br>\n";
    }

    ?>




    As you can see, this works perfect (check out link posted above). Now, I want to add about 5-10 more RSS feeds like this to the same page. Now I don't know PHP at all, so I'm not sure how to accomplish this. How can I use the ONE technewsdata.php file for all my RSS feeds? Is it called an array? That's where I'm hoping you guys could help me. So I don't have to create say, technewsdata_slashdot.php, with the same parse information above. I want to utilize one php file.

    I hope this makes sense, and if not let me know what else you need from me.

    Any help or information on this would be greatly appreciated!
    Winforums.org Support Forums
    Yupp, we blog too!
widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
Working...
X