| |
|
|
| | По неясной причине новости с RSS линейки новостей Гугла то идут то не идут на нашем сайте
Как возвращать код ошибки?
PHP:
<?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);
?> | |
| |
|