Неделю назад отвалилась rss лента,на протяжении 1,5 года все работало исправно,никаких изменений не вносилось. Текст с ошибкой: This page contains the following errors: error on line 2 at column 1: Extra content at the end of the document Below is a rendering of the page up to the first error. Код файла: PHP: <?php // spec https://partner.news.yandex.ru/tech.pdf $this->locator->onlyContent = true; $this->addHeader("Content-Type", 'text/xml; charset=' . PAGE_CHARSET); $content .= '<?xml version="1.0" encoding="'.PAGE_CHARSET.'"?> <rss xmlns:yandex="http://news.yandex.ru" xmlns:media="http://search.yahoo.com/mrss/" version="2.0"><channel><title>'.$this->parcer->pageContent(array('sharetitle')).'</title> <link>'.$this->locator->host.'</link> <description>'.$this->parcer->pageContent(array('sharedescription')).'</description> <yandex:logo>'.$this->locator->host.'css/normal_logo.png</yandex:logo> <yandex:logo type="square">'.$this->locator->host.'css/square_logo180x180.png</yandex:logo>'; $deep = (int)$this->tools->valREQUEST('deep'); if($deep==0)$deep=9; // все ссылки на самостоятельные страницы /* /bz/4x4-club/ /bz/spy/ /bz/video/ */ if ($this->sql->exec("select *, datediff(now(),`ndate`) as 'datediff' from meta where (`link` like '/news/%' or `link` like '/bz/4x4-club/%' or `link` like '/bz/spy/%' or `link` like '/bz/video/%' or `link` like '/bz/handmade/%' or `link` like '/bz/retro/%' or `link` like '/news/pdd/%' or `link` like '/bz/camper/%') and datediff(now(),`ndate`) < $deep order by `ndate`")){ if ($this->sql->row > 0){ foreach($this->sql->aResult as $line){ $resMatch = array('href'=>array(),'src'=>array()); $descr = $this->parcer->run($line['content']); $authorMail = ADMIN_MAIL; preg_match_all("/<a[^>]*>.*?<\/a>/iD",$descr,$ancorMatch); foreach($ancorMatch as $ancor){ preg_match_all('/[f|c]="([^"]+)"/iD',$ancor[0],$res); $ancorName = strip_tags($ancor[0]); foreach($res[0] as $i=>$v){ if(substr($v,0,1)=='f'){ if(strpos($v,$this->locator->host)===false){ if(!in_array($res[1][$i],$resMatch['href']))$resMatch['href'][] = array($res[1][$i],$ancorName); } }else{ if(!in_array($res[1][$i],$resMatch['src']))$resMatch['src'][] = $res[1][$i]; } } } $descr = $this->tools->validXML(strip_tags($descr)); $link = $this->locator->host.substr($line['link'],1); $nDate = new DateTime($line['ndate']); $nDate = $nDate->format('r'); $strPic = ''; $strLink = ''; foreach($resMatch['src'] as $v){ $ext = pathinfo($v,PATHINFO_EXTENSION); $path = str_replace($this->locator->host,ABSPATH,$v); if(is_file($path)){ $imgInfo = stat($path); $strPic .= '<enclosure url="'.$v.'" type="image/'.$ext.'" length="'.$imgInfo['size'].'"/>'; } } if(count($resMatch['href'])>0){ $strLink .= '<yandex:related>'; foreach($resMatch['href'] as $v){ $strLink .= '<link url="'.$v[0].'">'.($v[1]?$v[1]:$v[0]).'</link>'; } $strLink .= '</yandex:related>'; } $content .= <<<TXT <item> <title>{$this->tools->validXML($line['title'])}</title> <link>$link</link> <guid>$link</guid> <description>{$this->tools->validXML($line['description'])}</description> <author>$authorMail</author> <category>Авто</category> <pubDate>$nDate</pubDate> <yandex:genre>article</yandex:genre> <yandex:full-text>$descr</yandex:full-text> <comments></comments> $strPic $strLink </item> TXT; } } } /* картинки <enclosure url="http://www.rossiyskie-novosti.ru/2003/03/25/yandex.jpg" type="image/jpeg"/> ссылки на сторонние ресурсы <yandex:related> <link url="http://www.kremlin.ru/">Президент России</link> </yandex:related> */ $content .= '</channel></rss>'; ?>