parse rss feed

Discussion in 'PHP' started by Riots, Sep 25, 2008.

  1. #1
    Hey all I have parsed my rss using simplepie but for some reason my links all just add ?link=0 ?link=1 ?link=3 and so its add that to my url so all the links look like www.graffintheno.com/?link=0 and my blog is blog.graffintheno.com check out my site graffintheno.com hover over the links you will see it was working perfect I don't know what happen.. any help be great
     
    Riots, Sep 25, 2008 IP
  2. hamidof

    hamidof Peon

    Messages:
    619
    Likes Received:
    44
    Best Answers:
    0
    Trophy Points:
    0
    #2
    I think you should try MagpieRSS and do it this way:
    http://magpierss.sourceforge.net/

    
    require_once 'rss_fetch.inc';
    
    $url = 'http://magpie.sf.net/samples/imc.1-0.rdf';
    $rss = fetch_rss($url);
    
    echo "Site: ", $rss->channel['title'], "<br>
    ";
    foreach ($rss->items as $item ) {
    	$title = $item[title];
    	$url   = $item[link];
    	echo "<a href=$url>$title</a></li><br>
    ";
    }
    
    PHP:
     
    hamidof, Sep 25, 2008 IP
  3. firefighter

    firefighter Guest

    Messages:
    31
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Hmmm, you can try this with simplepie:

    $item->get_permalink();

    If you are using multiple feeds you will need to make another call to get_feed() before calling the get_link();

    PM me if you feel I can help.

    ~ Firefighter, Broadens.com
     
    firefighter, Sep 26, 2008 IP