$ch = curl_init („http://buzzlog.buzz.yahoo.com/feeds/buzzsportm.xml ");
curl_setopt ($ch, CURLOPT_RETURNTRANSFER, richten aus);
curl_setopt ($ch, CURLOPT_HEADER, 0);
$data = curl_exec ($ch);
curl_close ($ch);
$doc = neues SimpleXmlElement ($data, LIBXML_NOCDATA);
//print_r ($doc);
wenn (isset ($doc->channel))
{parseRSS ($doc);
}
wenn (isset ($doc->entry))
{parseAtom ($doc);
}
Funktion parseRSS ($xml)
{
Echo „“. $xml->channel->title. „“;
$cnt = Zählimpuls ($xml->channel->item);
für ($i=0; $i<$cnt; $i++)
{
$url = $xml->channel->item [$i] - >link;
$title = $xml->channel->item [$i] - >title;
$title = stripslashes ($title);
$title = strip_tags ($title);
$title = ereg_replace („[^A-Z A-z]“, "", $title);
$desc = $xml->channel->item [$i] - >description;
Echo „
|