Topic: about the use of rss 2
Hi,
I'm trying to use a rss feed but it does not work very good.
<?php
$site = "http://permanent.nouvelobs.com/cgi/rss/permanent_une";
$fp = @fopen($site,"r");
while(!feof($fp)) $raw .= @fgets($fp, 4096);
fclose($fp);
if( eregi("<item>(.*)</item>", $raw, $rawitems ) ) {
$items = explode("<item>", $rawitems[0]);
for( $i = 0; $i < count($items)-1; $i++ ) {
eregi("<title>(.*)</title>",$items[$i+1], $title );
eregi("<url>(.*)</url>",$items[$i+1], $url );
eregi("<categorie>(.*)</categorie>",$items[$i+1], $cat);
echo "<li><a href='".$url[1]."'>".$title[1]."</a> - ".$cat[1];
}
}
?>
With that code the problem is that the link are not good. See here for example http://www.oyre.net/test.php
You'll see that the link is always the same. It's not normal. There is a problem when reading the link.
Can anybody help me?
Ludo,