كود PHP:
<?
$opentype = "_blank"; // طريقة فتح الوصلات
// (_blank) نافذة جديد
// () نفس النافذة
$bgcolor= "#FFFFFF"; // لون خلفية الأخبار
$url = "http://www.aljazeera.net/news/arabic/";
$string = implode("\n", file($url));
$string2 = explode("<!--start second News-->", $string);
$string3 = explode("<!--end second News-->", $string2[1]);
$news = str_replace('href="../../news/arabic/',"href=\"$url",$string3[0]);
$news = str_replace('>- ',">",$news);
preg_match_all("/href[[:space:]]*=[[:space:]]*"."[\"']{0,1}([^\"'> ]+)/i",$news,$arr,PREG_SET_ORDER);
preg_match_all("|>([^<]*)</a|i",$news,$arr_text,PREG_SET_ORDER);
echo "<span dir=rtl><marquee direction=\"right\" bgcolor=\"$bgcolor\">";
for ($i=0;$i<count($arr);$i++)
if ($arr_text[$i][1]!="")
echo " <font face=\"Wingdings\" color=\"#808080\">v</font> <B><a href=\"".$arr[$i][1]."\" target=\"$opentype\">".$arr_text[$i][1]."</a></B>";
echo "</marquee></span>";
?>