<? echo '<div clas="3d_rss">'.@$items[$i]['desc'].'</div>'; ?>
Вот скрипт полностью:
<? $url=''; ; ?> <? function startElementReader($parser, $name, $attrs) { global $tag, $rss; if ($name == 'RSS') $rss = '^RSS'; elseif ($name == 'RDF:RDF') $rss = '^RDF:RDF'; $tag .= '^' . $name; } function endElementReader($parser, $name) { global $tag; global $itemCount, $items; if ($name == 'ITEM') { $itemCount++; } } function characterDataReader($parser, $data) { global $tag, $chanTitle, $chanLink, $chanDesc, $rss, $imgTitle, $imgLink, $imgUrl; global $items, $itemCount; $rssChannel = ''; if ($data) { if ($tag == $rss . '^CHANNEL^TITLE') { $chanTitle .= $data; } elseif ($tag == $rss . '^CHANNEL^LINK') { $chanLink .= $data; } elseif ($tag == $rss . '^CHANNEL^DESCRIPTION') { $chanDesc .= $data; } if ($rss == '^RSS') $rssChannel = '^CHANNEL'; if ($tag == $rss . $rssChannel . '^ITEM^TITLE') { $items[$itemCount]['title'] .= $data; } elseif ($tag == $rss . $rssChannel . '^ITEM^LINK') { $items[$itemCount]['link'] .= $data; } elseif ($tag == $rss . $rssChannel . '^ITEM^DESCRIPTION') { $items[$itemCount]['desc'] .= $data; } elseif ($tag == $rss . $rssChannel . '^ITEM^PUBDATE') { $items[$itemCount]['pubdate'] .= $data; } elseif ($tag == $rss . $rssChannel . '^IMAGE^TITLE') { $imgTitle .= $data; } elseif ($tag == $rss . $rssChannel . '^IMAGE^LINK') { $imgLink .= $data; } elseif ($tag == $rss . $rssChannel . '^IMAGE^URL') { $imgUrl .= $data; } } } function parseRSSReader($url) { global $tag, $chanTitle, $chanLink, $chanDesc, $rss, $items, $itemCount, $imgTitle, $imgLink, $imgUrl; $chanTitle = ''; $chanLink = ''; $chanDesc = ''; $imgTitle = ''; $imgLink = ''; $imgUrl = ''; $tag = ''; $rss = ''; global $items, $itemCount; $itemCount = 0; $data = ""; while (true) { break; } $data .= $datas; } if ($data != '') { if ($xmlresult) displayDataReader(); else print("Error parsing this feed !<br />Error: ".@$xmlError." , at line: ".@$xmlCrtline.""); } else { print("Error while retriving feed ".$url.""); } } function displayDataReader() { global $chanTitle, $chanLink, $chanDesc, $rss, $items, $itemCount, $imgTitle, $imgLink, $imgUrl; global $items, $itemCount; ?> <!--<? echo '<h2><a href="'.$chanLink.'" target="_blank">'.$chanTitle.'</a></h2> ' ;?>--> <? echo '<a href="'.$imgLink.'" target="_blank"><img src="'.$imgUrl.'" alt="'.$imgTitle.'" /></a> '; ?> <!--<? echo $chanDesc;?>--> <?echo '<div style="clear:both"></div>'; ?> <? for($i = 0;$i < 3;$i++) { if(@$items[$i]['link']<>''){ ?> <? echo '<h4><a href="'.@$items[$i]['link'].'" target="_blank"> '.@$items[$i]['title'].'</a></h4>'; ?> <? echo '<h5>'.@$items[$i]['pubdate'].'</h5>'; ?> <? echo '<div clas="3d_rss">'.@$items[$i]['desc'].'</div>'; ?> <? } } ?> <? } parseRSSReader($url); ?> <? ?> <meta http-equiv="Content-Type" content="text/html; charset=windows-1251">