/** * create_download * This prompts for a download of the song */ private function create_download() { // There should only be one here... if (count($this->urls) != 1) { debug_event('stream_playlist', 'Download called, but $urls contains ' . json_encode($this->urls), 2); } // Header redirect baby! $url = current($this->urls); $url = Stream_URL::add_options($url->url, '&action=download'); header('Location: ' . $url); exit; }