Ampache PHP Cross Reference Groupware Applications

Source: /waveform.php - 43 lines - 1252 bytes - Summary - Text - Print

Description: LICENSE: GNU General Public License, version 2 (GPLv2) Copyright 2001 - 2014 Ampache.org This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License v2 as published by the Free Software Foundation.

   1  <?php
   2  /* vim:set softtabstop=4 shiftwidth=4 expandtab: */
   3  /**
   4   *
   5   * LICENSE: GNU General Public License, version 2 (GPLv2)
   6   * Copyright 2001 - 2014 Ampache.org
   7   *
   8   * This program is free software; you can redistribute it and/or
   9   * modify it under the terms of the GNU General Public License v2
  10   * as published by the Free Software Foundation.
  11   *
  12   * This program is distributed in the hope that it will be useful,
  13   * but WITHOUT ANY WARRANTY; without even the implied warranty of
  14   * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  15   * GNU General Public License for more details.
  16   *
  17   * You should have received a copy of the GNU General Public License
  18   * along with this program; if not, write to the Free Software
  19   * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
  20   *
  21   */
  22  
  23  /**
  24   * Album Art
  25   * This pulls album art out of the file using the getid3 library
  26   * and dumps it to the browser as an image mime type.
  27   *
  28   */
  29  
  30  require_once  'lib/init.php';
  31  
  32  if (!AmpConfig::get('waveform')) exit();
  33  
  34  // Prevent user from aborting script
  35  ignore_user_abort(true);
  36  set_time_limit(300);
  37  
  38  $id = $_REQUEST['song_id'];
  39  $waveform = Waveform::get($id);
  40  if ($waveform) {
  41      header('Content-type: image/png');
  42      echo $waveform;
  43  }

title

Description

title

Description

title

Description

title

title

Body