Create an RSS feed with linked links
Edit: I have this line:
$comments = "http://www.kiubbo.com/index.php?action=comments¶m=".$articles[$index]->getId();
And if I put it here, it works in the title tag, but not in the link or guid tags.
fwrite ($fp, "<item>\n");
fwrite ($fp, " <title>$title</title>\n");
fwrite ($fp, " <link>$comments</link>\n");
fwrite ($fp, "<guid>$comments</guid>\n");
fwrite ($fp, "</item>\n");
}
fwrite ($fp, "</channel></rss>\n");
fclose ($fp);
For some reason it takes out the "& param" part of the link ($ comments).
Thanks everyone.
0
a source to share
3 answers
Perhaps your parser was unable to correct the error correctly. You, for example, did not escape your ampersands. Ask Feed Validator what is wrong.
If you want to write XML file, use XML tool, do not separate lines.
+1
a source to share