استخدم الطريقة التالية
كود PHP:
include_once("XmlParser.class.php");
$FeedUrl="http://newsrss.bbc.co.uk/rss/arabic/news/rss.xml";
$XMLpar = new SimpleXmlParser($FeedUrl);
foreach ($XMLpar->arr_item as $newsid) {
$link=(iconv("UTF-8","windows-1256","$newsid[link]"));
$title=(iconv("UTF-8","windows-1256","$newsid[title]"));
$mar.= "<td><img border=\"0\" src=\"images/bbc.jpg\"> </td><td nowrap><b><a target=\"_blank\" href=\"$link\">$title</a></b> </td>";
}
$FeedUrl="http://arabic.cnn.com/rss/cnnarabic_topnews.rss";
$XMLpar = new SimpleXmlParser($FeedUrl);
foreach ($XMLpar->arr_item as $newsid) {
$link=(iconv("UTF-8","windows-1256","$newsid[link]"));
$title=(iconv("UTF-8","windows-1256","$newsid[title]"));
$mar.= "<td><img border=\"0\" src=\"images/cnn.jpg\"> </td><td nowrap><b><a target=\"_blank\" href=\"$link\">$title</a></b> </td>";
}
كود HTML:
<table border="0" cellpadding="0" cellspacing="0" width="100%" id="table1" height="100%">
<tr>
<td valign="middle">
<marquee onmouseover="this.stop()" onmouseout="this.start()" direction="right" scrollamount="5">
<table border="0" cellpadding="0" cellspacing="0" width="100%" id="table1">
<tr><?PHP echo $mar;?>
</tr>
</table>
</marquee>
</td>
</tr>
</table>
تم إرفاق الملف المضمن