ESPN soccer news on your site
<?php
$xmlfile = fopen("http://soccernet.espn.go.com/rss/news", "r");
if(!$xmlfile)
die("cannot open the site");
$readfile = fread($xmlfile ,40000);
$searchfile = eregi("<item>(.*)</item>", $readfile ,$arrayreg);
$chunks = explode("<item>", $arrayreg[0]);
$count = count($chunks);
for($i=1 ; $i<=$count-1 ;$i++)
{
ereg("<title>(.*)</title>",$chunks[$i], $title);
ereg("<link>(.*)</link>",$chunks[$i], $links);
echo "<li>";
echo "<a href ='$links[1]'\>$title[1]</a>";
echo "</li>";
}
?>
And here it is
|