PHP/Zend: How to force browsers to don't show warnings on webpage for a particular case?

Posted by NAVEED on Stack Overflow See other posts from Stack Overflow or by NAVEED
Published on 2010-04-16T07:26:57Z Indexed on 2010/04/16 7:33 UTC
Read the original article Hit count: 239

I trying to get twitter updates like this:

try {

  $doc = new DOMDocument();
  $doc->load('http://twitter.com/statuses/user_timeline/1234567890.rss');
  $isOK = true;

} catch( Zend_Exception $e ) {
  $isOK = false;
}

If there is not problem with internet connection then $isOK = true; is set. But if there is a problem in loading twitter page then it shows following warnings and does not set $isOK = false;

Warning: DOMDocument::load(http://twitter.com/statuses/user_timeline/1234567890.rss) [domdocument.load]: failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found in /var/www/vcred/application/controllers/IndexController.php on line 120

I don't want to see above warning on my webpage in any case. Any idea?

Thanks

© Stack Overflow or respective owner

Related posts about php

Related posts about zend