Hello,

I'm using a feed on my site for news. Now, when the feed site is down my
site crashes. Is there a way for not showing this 'fatal error'? And my
second question: it only crashes after e.g. 15 seconds, but I want to move
on faster. If the rss site is down it has to go further after e.g. 2
seconds...

It still throws this exception:

"Fatal error: Uncaught exception 'Zend_Http_Client_Exception' with message
'Unable to read response, or response is empty' in
C:\wamp\php\Zend\Http\Client.php:836 Stack trace: #0
C:\wamp\php\Zend\Feed.php(171): Zend_Http_Client->request('GET') #1
C:\wamp\www\kantersnet\app\modules\default\controllers\IndexController.php(22):
Zend_Feed::import('http://www.test...') #2
C:\wamp\php\Zend\Controller\Action.php(502): IndexController->indexAction()
#3 C:\wamp\php\Zend\Controller\Dispatcher\Standard.php(293):
Zend_Controller_Action->dispatch('indexAction') #4
C:\wamp\php\Zend\Controller\Front.php(946):
Zend_Controller_Dispatcher_Standard->dispatch(Object(Zend_Controller_Request_Http),
Object(Zend_Controller_Response_Http)) #5
C:\wamp\www\kantersnet\application.php(180):
Zend_Controller_Front->dispatch() #6
C:\wamp\www\kantersnet\application.php(48):
ZfApplication->dispatch(Object(Zend_Controller_Front)) #7
C:\wamp\www\kantersnet\public_html\index.php(57): ZfApplication->bootstrap()
#8 {main} thrown in C:\wamp\php\Zend\Http\Client.php on line 836"

try {    
  $slashdotRss  = Zend_Feed::import('http://www.test.eu/rss.php');
  foreach ($slashdotRss as $item) {
    $channel1[] = array(
        'title'                 => $item->title(),
        'link'                  => $item->link(),
        'description'   => $item->description());
  }
  $this->view->nieuwskan = $channel1;
}
catch (Zend_Feed_Exception $e) {
}

-----
visit my website at  http://www.phpscriptor.com/ http://www.phpscriptor.com/ 
-- 
View this message in context: 
http://www.nabble.com/Zend_Feed%3A%3Aimport--link-down-tp21515256p21515256.html
Sent from the Zend Framework mailing list archive at Nabble.com.

Reply via email to