I create this PHP file. But this read only one link. How can I add the other two? The selection box read on page only one link ... http://www.kurir.rs/rss/vesti/"
http://www.blic.rs/rss/IT
<form action="index.php" method="POST">
<select name="rss">
<option value="http://www.kurir.rs/rss/vesti/">Kurir</option>
<option value="http://www.blic.rs/rss/IT">Blic</option>
<option value="http://www.b92.net/info/rss/tehnopolis.xml">B92</option>
</select>
<input type="submit" value="Select" />
</form>
<?php
$rss = new DOMDocument();
$rss->load('http://www.b92.net/info/rss/tehnopolis.xml');
$feed = array();
foreach ($rss->getElementsByTagName('item') as $node) {
$item = array (
'title' => $node->getElementsByTagName('title')->item(0)->nodeValue,
'desc' => $node->getElementsByTagName('description')->item(0)->nodeValue,
'link' => $node->getElementsByTagName('link')->item(0)->nodeValue,
'date' => $node->getElementsByTagName('pubDate')->item(0)->nodeValue,
);
array_push($feed, $item);
}
$limit = 5;
for($x=0;$x<$limit;$x++) {
$title = str_replace(' & ', ' & ', $feed[$x]['title']);
$link = $feed[$x]['link'];
$description = $feed[$x]['desc'];
$date = date('l F d, Y', strtotime($feed[$x]['date']));
echo '<p><strong><a href="'.$link.'" title="'.$title.'">'.$title.'</a></strong><br />';
echo '<small><em>Posted on '.$date.'</em></small></p>';
echo '<p>'.$description.'</p>';
}
?>