Hello,

I was soo happy when I parsed my first RSS feed from another site. But I was wondering if I can the following:

  • More space between the headlines
  • Open the links in a new window

I read some manuals online but am kinda lost.
I use the MAgpie script, and this is what I did untill now:

<?php

require_once 'rss_fetch.inc';
$url = 'http://www.b92.net/news/rss/vesti-naslovi.php';


$num_items = 10;
$rss = fetch_rss($url);

$items = array_slice($rss->items, 0, $num_items);

foreach ( $items as $item ) {
	$title = $item[title];
	$url   = $item[link];
	echo "<a href=$url>$title</a></li><br>\n";
}



?>

Any help would be very nice and apreciated.

    insert the

    </ br>

    tag and

    target="blank"

    is suitable locations.

      I fixed it, should be like this.

       <?php
      
      require_once('rss_fetch.inc');
      
      $url = 'http://www.b92.net/news/rss/vesti-naslovi.php';
      $max_items = 5;
      
      $rss = fetch_rss($url);
      $items = array_slice($rss->items, 0, $max_items);
      
      foreach ($items as $item) {
      	$title = $item[title];
      	$href = $item[link];
      	$url   = $item[link];
      
      	echo "<p><a href=$url  target='_blank'>&#8594; $title</a></p>\n";
      
      }
      echo "<p>", $rss->channel['title'], "</p>";
      ?>
        Write a Reply...