case 0: $url = 'https://api.twitch.tv/kraken/streams/'.$stream['stream_username']; $content = file_get_contents($url); $json = json_decode($content, true); if($json['stream']){ $this->_getDb()->update("xf_ice_livestreams", array('live'=>1), "`stream_id`=".$stream['stream_id']); $online++; }else{ $this->_getDb()->update("xf_ice_livestreams", array('live'=>0), "`stream_id`=".$stream['stream_id']); } break;