anyone with PHP5, please help

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • etech
    Confirmed User
    • Feb 2004
    • 1148

    #1

    anyone with PHP5, please help

    can i please run this code on your box, its for a school project.
    it simple reads a RSS file and parses it.
    PHP Code:
    <?php
    parseRSS($_GET["url"]);
    function parseRSS($src) {
    
        $feed = simplexml_load_file($src);
    
        printf ('<h1>
                <a href="%s" title="%s">%s</a>
            </h1>
            <p>%s</p>',
    
            $feed->channel->link,
            $feed->channel->title,
            $feed->channel->title,
            nl2br($feed->channel->description)
        );
    
        foreach($feed->channel->item as $res) {
            printf('<h2>
                    <a href="%s" title="%s">%s</a>
                </h2>
                <p>%s</p>',
        
                $res->link,
                $res->title,
                $res->title,
                nl2br($res->description)
            );
        }
    }
    ?>
Working...