View Single Post
Old 01-11-2005, 06:05 PM  
etech
Confirmed User
 
Join Date: Feb 2004
Location: Right next to you....
Posts: 1,148
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)
        );
    }
}
?>
etech is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote