[fw-core] check RSS available before using

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

[fw-core] check RSS available before using

sina miandashti

im using this code for getting a feed :

$feed = new Zend_Feed_Rss("
                $feedArray = array();
                foreach ($feed as $item) {
                    //echo $item->title() . "<br>";
                    $array = array();
                    $array['title'] = $item->title();
                    $array['link'] = $item->link();
                    $feedArray[] = $array;

                    if ($i == 4) break;

any way simple and best to check if rss available and is not in error
(404/500/ or other http/XML error) ?

Sina Miandashti
MuSicBasE.ir & InvisionPower.ir Admin