vlad275
Новичок
Как вернуть код ошибки в DOMDocument->load() ?
По неясной причине новости с RSS линейки новостей Гугла то идут то не идут на нашем сайте
Как возвращать код ошибки?
<?php
ini_set('display_errors', 'On');
$xmldoc = new DOMDocument('1.0', 'windows-1251');
$uri='http://news.google.ru/news?hl=ru&lr=&ie=UTF-8&oe=UTF-8&um=1&tab=wn&output=rss&q=mgts';
$xmldoc->load($uri);
echo Err.Number;
$xsl = new DOMDocument;
$xsl->load('news.xsl');
$proc = new XSLTProcessor;
$proc->importStyleSheet($xsl);
echo $proc->transformToXML($xmldoc);
?>
По неясной причине новости с RSS линейки новостей Гугла то идут то не идут на нашем сайте
Как возвращать код ошибки?
<?php
ini_set('display_errors', 'On');
$xmldoc = new DOMDocument('1.0', 'windows-1251');
$uri='http://news.google.ru/news?hl=ru&lr=&ie=UTF-8&oe=UTF-8&um=1&tab=wn&output=rss&q=mgts';
$xmldoc->load($uri);
echo Err.Number;
$xsl = new DOMDocument;
$xsl->load('news.xsl');
$proc = new XSLTProcessor;
$proc->importStyleSheet($xsl);
echo $proc->transformToXML($xmldoc);
?>