public function heartbeatAction() { include_once 'source/lib/Radio.php'; $Radio = new Radio(array('silent' => true)); $Radio->getShows(); $npShow = $Radio->getNowPlaylingShow(); $npSong = $Radio->getNowPlayingSong(); $return = array('show' => $npShow['name'], 'song' => $npSong); echo json_encode($return); }