Make WordPress Core

Ticket #23842: 23842.patch

File 23842.patch, 44.0 KB (added by bpetty, 11 years ago)
  • new file wp-includes/ID3/license.commercial.txt

    diff --git wp-includes/ID3/license.commercial.txt wp-includes/ID3/license.commercial.txt
    new file mode 100644
    index 0000000..416e5a1
    - +  
     1                  getID3() Commercial License
     2                  ===========================
     3
     4getID3() is licensed under the "GNU Public License" (GPL) and/or the
     5"getID3() Commercial License" (gCL). This document describes the gCL.
     6
     7---------------------------------------------------------------------
     8
     9The license is non-exclusively granted to a single person or company,
     10per payment of the license fee, for the lifetime of that person or
     11company. The license is non-transferrable.
     12
     13The gCL grants the licensee the right to use getID3() in commercial
     14closed-source projects. Modifications may be made to getID3() with no
     15obligation to release the modified source code. getID3() (or pieces
     16thereof) may be included in any number of projects authored (in whole
     17or in part) by the licensee.
     18
     19The licensee may use any version of getID3(), past, present or future,
     20as is most convenient. This license does not entitle the licensee to
     21receive any technical support, updates or bugfixes, except as such are
     22made publicly available to all getID3() users.
     23
     24The licensee may not sub-license getID3() itself, meaning that any
     25commercially released product containing all or parts of getID3() must
     26have added functionality beyond what is available in getID3();
     27getID3() itself may not be re-licensed by the licensee.
  • new file wp-includes/ID3/license.txt

    diff --git wp-includes/ID3/license.txt wp-includes/ID3/license.txt
    new file mode 100644
    index 0000000..9fec808
    - +  
     1            GNU GENERAL PUBLIC LICENSE
     2               Version 2, June 1991
     3
     4 Copyright (C) 1989, 1991 Free Software Foundation, Inc.
     5              59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
     6 Everyone is permitted to copy and distribute verbatim copies
     7 of this license document, but changing it is not allowed.
     8
     9                Preamble
     10
     11  The licenses for most software are designed to take away your
     12freedom to share and change it.  By contrast, the GNU General Public
     13License is intended to guarantee your freedom to share and change free
     14software--to make sure the software is free for all its users.  This
     15General Public License applies to most of the Free Software
     16Foundation's software and to any other program whose authors commit to
     17using it.  (Some other Free Software Foundation software is covered by
     18the GNU Library General Public License instead.)  You can apply it to
     19your programs, too.
     20
     21  When we speak of free software, we are referring to freedom, not
     22price.  Our General Public Licenses are designed to make sure that you
     23have the freedom to distribute copies of free software (and charge for
     24this service if you wish), that you receive source code or can get it
     25if you want it, that you can change the software or use pieces of it
     26in new free programs; and that you know you can do these things.
     27
     28  To protect your rights, we need to make restrictions that forbid
     29anyone to deny you these rights or to ask you to surrender the rights.
     30These restrictions translate to certain responsibilities for you if you
     31distribute copies of the software, or if you modify it.
     32
     33  For example, if you distribute copies of such a program, whether
     34gratis or for a fee, you must give the recipients all the rights that
     35you have.  You must make sure that they, too, receive or can get the
     36source code.  And you must show them these terms so they know their
     37rights.
     38
     39  We protect your rights with two steps: (1) copyright the software, and
     40(2) offer you this license which gives you legal permission to copy,
     41distribute and/or modify the software.
     42
     43  Also, for each author's protection and ours, we want to make certain
     44that everyone understands that there is no warranty for this free
     45software.  If the software is modified by someone else and passed on, we
     46want its recipients to know that what they have is not the original, so
     47that any problems introduced by others will not reflect on the original
     48authors' reputations.
     49
     50  Finally, any free program is threatened constantly by software
     51patents.  We wish to avoid the danger that redistributors of a free
     52program will individually obtain patent licenses, in effect making the
     53program proprietary.  To prevent this, we have made it clear that any
     54patent must be licensed for everyone's free use or not licensed at all.
     55
     56  The precise terms and conditions for copying, distribution and
     57modification follow.
     58
    059
     60            GNU GENERAL PUBLIC LICENSE
     61   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
     62
     63  0. This License applies to any program or other work which contains
     64a notice placed by the copyright holder saying it may be distributed
     65under the terms of this General Public License.  The "Program", below,
     66refers to any such program or work, and a "work based on the Program"
     67means either the Program or any derivative work under copyright law:
     68that is to say, a work containing the Program or a portion of it,
     69either verbatim or with modifications and/or translated into another
     70language.  (Hereinafter, translation is included without limitation in
     71the term "modification".)  Each licensee is addressed as "you".
     72
     73Activities other than copying, distribution and modification are not
     74covered by this License; they are outside its scope.  The act of
     75running the Program is not restricted, and the output from the Program
     76is covered only if its contents constitute a work based on the
     77Program (independent of having been made by running the Program).
     78Whether that is true depends on what the Program does.
     79
     80  1. You may copy and distribute verbatim copies of the Program's
     81source code as you receive it, in any medium, provided that you
     82conspicuously and appropriately publish on each copy an appropriate
     83copyright notice and disclaimer of warranty; keep intact all the
     84notices that refer to this License and to the absence of any warranty;
     85and give any other recipients of the Program a copy of this License
     86along with the Program.
     87
     88You may charge a fee for the physical act of transferring a copy, and
     89you may at your option offer warranty protection in exchange for a fee.
     90
     91  2. You may modify your copy or copies of the Program or any portion
     92of it, thus forming a work based on the Program, and copy and
     93distribute such modifications or work under the terms of Section 1
     94above, provided that you also meet all of these conditions:
     95
     96    a) You must cause the modified files to carry prominent notices
     97    stating that you changed the files and the date of any change.
     98
     99    b) You must cause any work that you distribute or publish, that in
     100    whole or in part contains or is derived from the Program or any
     101    part thereof, to be licensed as a whole at no charge to all third
     102    parties under the terms of this License.
     103
     104    c) If the modified program normally reads commands interactively
     105    when run, you must cause it, when started running for such
     106    interactive use in the most ordinary way, to print or display an
     107    announcement including an appropriate copyright notice and a
     108    notice that there is no warranty (or else, saying that you provide
     109    a warranty) and that users may redistribute the program under
     110    these conditions, and telling the user how to view a copy of this
     111    License.  (Exception: if the Program itself is interactive but
     112    does not normally print such an announcement, your work based on
     113    the Program is not required to print an announcement.)
     114
    1115
     116These requirements apply to the modified work as a whole.  If
     117identifiable sections of that work are not derived from the Program,
     118and can be reasonably considered independent and separate works in
     119themselves, then this License, and its terms, do not apply to those
     120sections when you distribute them as separate works.  But when you
     121distribute the same sections as part of a whole which is a work based
     122on the Program, the distribution of the whole must be on the terms of
     123this License, whose permissions for other licensees extend to the
     124entire whole, and thus to each and every part regardless of who wrote it.
     125
     126Thus, it is not the intent of this section to claim rights or contest
     127your rights to work written entirely by you; rather, the intent is to
     128exercise the right to control the distribution of derivative or
     129collective works based on the Program.
     130
     131In addition, mere aggregation of another work not based on the Program
     132with the Program (or with a work based on the Program) on a volume of
     133a storage or distribution medium does not bring the other work under
     134the scope of this License.
     135
     136  3. You may copy and distribute the Program (or a work based on it,
     137under Section 2) in object code or executable form under the terms of
     138Sections 1 and 2 above provided that you also do one of the following:
     139
     140    a) Accompany it with the complete corresponding machine-readable
     141    source code, which must be distributed under the terms of Sections
     142    1 and 2 above on a medium customarily used for software interchange; or,
     143
     144    b) Accompany it with a written offer, valid for at least three
     145    years, to give any third party, for a charge no more than your
     146    cost of physically performing source distribution, a complete
     147    machine-readable copy of the corresponding source code, to be
     148    distributed under the terms of Sections 1 and 2 above on a medium
     149    customarily used for software interchange; or,
     150
     151    c) Accompany it with the information you received as to the offer
     152    to distribute corresponding source code.  (This alternative is
     153    allowed only for noncommercial distribution and only if you
     154    received the program in object code or executable form with such
     155    an offer, in accord with Subsection b above.)
     156
     157The source code for a work means the preferred form of the work for
     158making modifications to it.  For an executable work, complete source
     159code means all the source code for all modules it contains, plus any
     160associated interface definition files, plus the scripts used to
     161control compilation and installation of the executable.  However, as a
     162special exception, the source code distributed need not include
     163anything that is normally distributed (in either source or binary
     164form) with the major components (compiler, kernel, and so on) of the
     165operating system on which the executable runs, unless that component
     166itself accompanies the executable.
     167
     168If distribution of executable or object code is made by offering
     169access to copy from a designated place, then offering equivalent
     170access to copy the source code from the same place counts as
     171distribution of the source code, even though third parties are not
     172compelled to copy the source along with the object code.
     173
    2174
     175  4. You may not copy, modify, sublicense, or distribute the Program
     176except as expressly provided under this License.  Any attempt
     177otherwise to copy, modify, sublicense or distribute the Program is
     178void, and will automatically terminate your rights under this License.
     179However, parties who have received copies, or rights, from you under
     180this License will not have their licenses terminated so long as such
     181parties remain in full compliance.
     182
     183  5. You are not required to accept this License, since you have not
     184signed it.  However, nothing else grants you permission to modify or
     185distribute the Program or its derivative works.  These actions are
     186prohibited by law if you do not accept this License.  Therefore, by
     187modifying or distributing the Program (or any work based on the
     188Program), you indicate your acceptance of this License to do so, and
     189all its terms and conditions for copying, distributing or modifying
     190the Program or works based on it.
     191
     192  6. Each time you redistribute the Program (or any work based on the
     193Program), the recipient automatically receives a license from the
     194original licensor to copy, distribute or modify the Program subject to
     195these terms and conditions.  You may not impose any further
     196restrictions on the recipients' exercise of the rights granted herein.
     197You are not responsible for enforcing compliance by third parties to
     198this License.
     199
     200  7. If, as a consequence of a court judgment or allegation of patent
     201infringement or for any other reason (not limited to patent issues),
     202conditions are imposed on you (whether by court order, agreement or
     203otherwise) that contradict the conditions of this License, they do not
     204excuse you from the conditions of this License.  If you cannot
     205distribute so as to satisfy simultaneously your obligations under this
     206License and any other pertinent obligations, then as a consequence you
     207may not distribute the Program at all.  For example, if a patent
     208license would not permit royalty-free redistribution of the Program by
     209all those who receive copies directly or indirectly through you, then
     210the only way you could satisfy both it and this License would be to
     211refrain entirely from distribution of the Program.
     212
     213If any portion of this section is held invalid or unenforceable under
     214any particular circumstance, the balance of the section is intended to
     215apply and the section as a whole is intended to apply in other
     216circumstances.
     217
     218It is not the purpose of this section to induce you to infringe any
     219patents or other property right claims or to contest validity of any
     220such claims; this section has the sole purpose of protecting the
     221integrity of the free software distribution system, which is
     222implemented by public license practices.  Many people have made
     223generous contributions to the wide range of software distributed
     224through that system in reliance on consistent application of that
     225system; it is up to the author/donor to decide if he or she is willing
     226to distribute software through any other system and a licensee cannot
     227impose that choice.
     228
     229This section is intended to make thoroughly clear what is believed to
     230be a consequence of the rest of this License.
     231
    3232
     233  8. If the distribution and/or use of the Program is restricted in
     234certain countries either by patents or by copyrighted interfaces, the
     235original copyright holder who places the Program under this License
     236may add an explicit geographical distribution limitation excluding
     237those countries, so that distribution is permitted only in or among
     238countries not thus excluded.  In such case, this License incorporates
     239the limitation as if written in the body of this License.
     240
     241  9. The Free Software Foundation may publish revised and/or new versions
     242of the General Public License from time to time.  Such new versions will
     243be similar in spirit to the present version, but may differ in detail to
     244address new problems or concerns.
     245
     246Each version is given a distinguishing version number.  If the Program
     247specifies a version number of this License which applies to it and "any
     248later version", you have the option of following the terms and conditions
     249either of that version or of any later version published by the Free
     250Software Foundation.  If the Program does not specify a version number of
     251this License, you may choose any version ever published by the Free Software
     252Foundation.
     253
     254  10. If you wish to incorporate parts of the Program into other free
     255programs whose distribution conditions are different, write to the author
     256to ask for permission.  For software which is copyrighted by the Free
     257Software Foundation, write to the Free Software Foundation; we sometimes
     258make exceptions for this.  Our decision will be guided by the two goals
     259of preserving the free status of all derivatives of our free software and
     260of promoting the sharing and reuse of software generally.
     261
     262                NO WARRANTY
     263
     264  11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
     265FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.  EXCEPT WHEN
     266OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
     267PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
     268OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
     269MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  THE ENTIRE RISK AS
     270TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU.  SHOULD THE
     271PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
     272REPAIR OR CORRECTION.
     273
     274  12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
     275WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
     276REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
     277INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
     278OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
     279TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
     280YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
     281PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
     282POSSIBILITY OF SUCH DAMAGES.
     283
     284             END OF TERMS AND CONDITIONS
     285
    4286
     287        How to Apply These Terms to Your New Programs
     288
     289  If you develop a new program, and you want it to be of the greatest
     290possible use to the public, the best way to achieve this is to make it
     291free software which everyone can redistribute and change under these terms.
     292
     293  To do so, attach the following notices to the program.  It is safest
     294to attach them to the start of each source file to most effectively
     295convey the exclusion of warranty; and each file should have at least
     296the "copyright" line and a pointer to where the full notice is found.
     297
     298    <one line to give the program's name and a brief idea of what it does.>
     299    Copyright (C) <year>  <name of author>
     300
     301    This program is free software; you can redistribute it and/or modify
     302    it under the terms of the GNU General Public License as published by
     303    the Free Software Foundation; either version 2 of the License, or
     304    (at your option) any later version.
     305
     306    This program is distributed in the hope that it will be useful,
     307    but WITHOUT ANY WARRANTY; without even the implied warranty of
     308    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     309    GNU General Public License for more details.
     310
     311    You should have received a copy of the GNU General Public License
     312    along with this program; if not, write to the Free Software
     313    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
     314
     315
     316Also add information on how to contact you by electronic and paper mail.
     317
     318If the program is interactive, make it output a short notice like this
     319when it starts in an interactive mode:
     320
     321    Gnomovision version 69, Copyright (C) year name of author
     322    Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
     323    This is free software, and you are welcome to redistribute it
     324    under certain conditions; type `show c' for details.
     325
     326The hypothetical commands `show w' and `show c' should show the appropriate
     327parts of the General Public License.  Of course, the commands you use may
     328be called something other than `show w' and `show c'; they could even be
     329mouse-clicks or menu items--whatever suits your program.
     330
     331You should also get your employer (if you work as a programmer) or your
     332school, if any, to sign a "copyright disclaimer" for the program, if
     333necessary.  Here is a sample; alter the names:
     334
     335  Yoyodyne, Inc., hereby disclaims all copyright interest in the program
     336  `Gnomovision' (which makes passes at compilers) written by James Hacker.
     337
     338  <signature of Ty Coon>, 1 April 1989
     339  Ty Coon, President of Vice
     340
  • new file wp-includes/ID3/readme.txt

    +This General Public License does not permit incorporating your program into
    +proprietary programs.  If your program is a subroutine library, you may
    +consider it more useful to permit linking proprietary applications with the
    +library.  If this is what you want to do, use the GNU Library General
    +Public License instead of this License.
    diff --git wp-includes/ID3/readme.txt wp-includes/ID3/readme.txt
    new file mode 100644
    index 0000000..548ba64
    - +  
     1/////////////////////////////////////////////////////////////////
     2/// getID3() by James Heinrich <info@getid3.org>               //
     3//  available at http://getid3.sourceforge.net                 //
     4//            or http://www.getid3.org                         //
     5/////////////////////////////////////////////////////////////////
     6//                                                             //
     7// changelog.txt - part of getID3()                            //
     8// See readme.txt for more details                             //
     9//                                                            ///
     10/////////////////////////////////////////////////////////////////
     11
     12        This code is released under the GNU GPL:
     13          http://www.gnu.org/copyleft/gpl.html
     14
     15     +---------------------------------------------+
     16     | If you do use this code somewhere, send me  |
     17     | an email and tell me how/where you used it. |
     18     |                                             |
     19     | If you want to donate, there is a link on   |
     20     | http://www.getid3.org for PayPal donations. |
     21     +---------------------------------------------+
     22
     23
     24
     25Quick Start
     26===========================================================================
     27
     28Q: How can I check that getID3() works on my server/files?
     29A: Unzip getID3() to a directory, then access /demos/demo.browse.php
     30
     31
     32
     33Support
     34===========================================================================
     35
     36Q: I have a question, or I found a bug. What do I do?
     37A: The preferred method of support requests and/or bug reports is the
     38   forum at http://support.getid3.org/
     39
     40
     41
     42Sourceforge Notification
     43===========================================================================
     44
     45It's highly recommended that you sign up for notification from
     46Sourceforge for when new versions are released. Please visit:
     47http://sourceforge.net/project/showfiles.php?group_id=55859
     48and click the little "monitor package" icon/link.  If you're
     49previously signed up for the mailing list, be aware that it has
     50been discontinued, only the automated Sourceforge notification
     51will be used from now on.
     52
     53
     54
     55What does getID3() do?
     56===========================================================================
     57
     58Reads & parses (to varying degrees):
     59 ¤ tags:
     60  * APE (v1 and v2)
     61  * ID3v1 (& ID3v1.1)
     62  * ID3v2 (v2.4, v2.3, v2.2)
     63  * Lyrics3 (v1 & v2)
     64
     65 ¤ audio-lossy:
     66  * MP3/MP2/MP1
     67  * MPC / Musepack
     68  * Ogg (Vorbis, OggFLAC, Speex)
     69  * AAC / MP4
     70  * AC3
     71  * DTS
     72  * RealAudio
     73  * Speex
     74  * DSS
     75  * VQF
     76
     77 ¤ audio-lossless:
     78  * AIFF
     79  * AU
     80  * Bonk
     81  * CD-audio (*.cda)
     82  * FLAC
     83  * LA (Lossless Audio)
     84  * LiteWave
     85  * LPAC
     86  * MIDI
     87  * Monkey's Audio
     88  * OptimFROG
     89  * RKAU
     90  * Shorten
     91  * TTA
     92  * VOC
     93  * WAV (RIFF)
     94  * WavPack
     95
     96 ¤ audio-video:
     97  * ASF: ASF, Windows Media Audio (WMA), Windows Media Video (WMV)
     98  * AVI (RIFF)
     99  * Flash
     100  * Matroska (MKV)
     101  * MPEG-1 / MPEG-2
     102  * NSV (Nullsoft Streaming Video)
     103  * Quicktime (including MP4)
     104  * RealVideo
     105
     106 ¤ still image:
     107  * BMP
     108  * GIF
     109  * JPEG
     110  * PNG
     111  * TIFF
     112  * SWF (Flash)
     113  * PhotoCD
     114
     115 ¤ data:
     116  * ISO-9660 CD-ROM image (directory structure)
     117  * SZIP (limited support)
     118  * ZIP (directory structure)
     119  * TAR
     120  * CUE
     121
     122
     123Writes:
     124  * ID3v1 (& ID3v1.1)
     125  * ID3v2 (v2.3 & v2.4)
     126  * VorbisComment on OggVorbis
     127  * VorbisComment on FLAC (not OggFLAC)
     128  * APE v2
     129  * Lyrics3 (delete only)
     130
     131
     132
     133Requirements
     134===========================================================================
     135
     136* PHP 4.2.0 up to 5.2.x for getID3() 1.7.x (and earlier)
     137* PHP 5.0.5 (or higher) for getID3() 1.8.x (and up)
     138* PHP 5.0.5 (or higher) for getID3() 2.0.x (and up)
     139* at least 4MB memory for PHP. 8MB or more is highly recommended.
     140  12MB is required with all modules loaded.
     141
     142
     143
     144Usage
     145===========================================================================
     146
     147See /demos/demo.basic.php for a very basic use of getID3() with no
     148fancy output, just scanning one file.
     149
     150See structure.txt for the returned data structure.
     151
     152*>  For an example of a complete directory-browsing,       <*
     153*>  file-scanning implementation of getID3(), please run   <*
     154*>  /demos/demo.browse.php                                 <*
     155
     156See /demos/demo.mysql.php for a sample recursive scanning code that
     157scans every file in a given directory, and all sub-directories, stores
     158the results in a database and allows various analysis / maintenance
     159operations
     160
     161To analyze remote files over HTTP or FTP you need to copy the file
     162locally first before running getID3(). Your code would look something
     163like this:
     164
     165// Copy remote file locally to scan with getID3()
     166$remotefilename = 'http://www.example.com/filename.mp3';
     167if ($fp_remote = fopen($remotefilename, 'rb')) {
     168    $localtempfilename = tempnam('/tmp', 'getID3');
     169    if ($fp_local = fopen($localtempfilename, 'wb')) {
     170        while ($buffer = fread($fp_remote, 8192)) {
     171            fwrite($fp_local, $buffer);
     172        }
     173        fclose($fp_local);
     174
     175                // Initialize getID3 engine
     176                $getID3 = new getID3;
     177
     178                $ThisFileInfo = $getID3->analyze($filename);
     179
     180        // Delete temporary file
     181        unlink($localtempfilename);
     182    }
     183    fclose($fp_remote);
     184}
     185
     186
     187See /demos/demo.write.php for how to write tags.
     188
     189
     190
     191What does the returned data structure look like?
     192===========================================================================
     193
     194See structure.txt
     195
     196It is recommended that you look at the output of
     197/demos/demo.browse.php scanning the file(s) you're interested in to
     198confirm what data is actually returned for any particular filetype in
     199general, and your files in particular, as the actual data returned
     200may vary considerably depending on what information is available in
     201the file itself.
     202
     203
     204
     205Notes
     206===========================================================================
     207
     208getID3() 1.x:
     209If the format parser encounters a critical problem, it will return
     210something in $fileinfo['error'], describing the encountered error. If
     211a less critical error or notice is generated it will appear in
     212$fileinfo['warning']. Both keys may contain more than one warning or
     213error. If something is returned in ['error'] then the file was not
     214correctly parsed and returned data may or may not be correct and/or
     215complete. If something is returned in ['warning'] (and not ['error'])
     216then the data that is returned is OK - usually getID3() is reporting
     217errors in the file that have been worked around due to known bugs in
     218other programs. Some warnings may indicate that the data that is
     219returned is OK but that some data could not be extracted due to
     220errors in the file.
     221
     222getID3() 2.x:
     223See above except errors are thrown (so you will only get one error).
     224
     225
     226
     227Disclaimer
     228===========================================================================
     229
     230getID3() has been tested on many systems, on many types of files,
     231under many operating systems, and is generally believe to be stable
     232and safe. That being said, there is still the chance there is an
     233undiscovered and/or unfixed bug that may potentially corrupt your
     234file, especially within the writing functions. By using getID3() you
     235agree that it's not my fault if any of your files are corrupted.
     236In fact, I'm not liable for anything :)
     237
     238
     239
     240License
     241===========================================================================
     242
     243GNU General Public License - see license.txt
     244
     245This program is free software; you can redistribute it and/or
     246modify it under the terms of the GNU General Public License
     247as published by the Free Software Foundation; either version 2
     248of the License, or (at your option) any later version.
     249
     250This program is distributed in the hope that it will be useful,
     251but WITHOUT ANY WARRANTY; without even the implied warranty of
     252MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     253GNU General Public License for more details.
     254
     255You should have received a copy of the GNU General Public License
     256along with this program; if not, write to:
     257Free Software Foundation, Inc.
     25859 Temple Place - Suite 330
     259Boston, MA  02111-1307, USA.
     260
     261FAQ:
     262Q: Can I use getID3() in my program? Do I need a commercial license?
     263A: You're generally free to use getID3 however you see fit. The only
     264   case in which you would require a commercial license is if you're
     265   selling your closed-source program that integrates getID3. If you
     266   sell your program including a copy of getID3, that's fine as long
     267   as you include a copy of the sourcecode when you sell it.  Or you
     268   can distribute your code without getID3 and say "download it from
     269   getid3.sourceforge.net"
     270
     271
     272
     273Why is it called "getID3()" if it does so much more than just that?
     274===========================================================================
     275
     276v0.1 did in fact just do that. I don't have a copy of code that old, but I
     277could essentially write it today with a one-line function:
     278  function getID3($filename) { return unpack('a3TAG/a30title/a30artist/a30album/a4year/a28comment/c1track/c1genreid', substr(file_get_contents($filename), -128)); }
     279
     280
     281Future Plans
     282===========================================================================
     283http://www.getid3.org/phpBB3/viewforum.php?f=7
     284
     285* Better support for MP4 container format
     286* Scan for appended ID3v2 tag at end of file per ID3v2.4 specs (Section 5.0)
     287* Support for JPEG-2000 (http://www.morgan-multimedia.com/jpeg2000_overview.htm)
     288* Support for MOD (mod/stm/s3m/it/xm/mtm/ult/669)
     289* Support for ACE (thanks Vince)
     290* Support for Ogg other than Vorbis, Speex and OggFlac (ie. Ogg+Xvid)
     291* Ability to create Xing/LAME VBR header for VBR MP3s that are missing VBR header
     292* Ability to "clean" ID3v2 padding (replace invalid padding with valid padding)
     293* Warn if MP3s change version mid-stream (in full-scan mode)
     294* check for corrupt/broken mid-file MP3 streams in histogram scan
     295* Support for lossless-compression formats
     296  (http://www.firstpr.com.au/audiocomp/lossless/#Links)
     297  (http://compression.ca/act-sound.html)
     298  (http://web.inter.nl.net/users/hvdh/lossless/lossless.htm)
     299* Support for RIFF-INFO chunks
     300  * http://lotto.st-andrews.ac.uk/~njh/tag_interchange.html
     301    (thanks Nick Humfrey <njhØsurgeradio*co*uk>)
     302  * http://abcavi.narod.ru/sof/abcavi/infotags.htm
     303    (thanks Kibi)
     304* Better support for Bink video
     305* http://www.hr/josip/DSP/AudioFile2.html
     306* http://www.pcisys.net/~melanson/codecs/
     307* Detect mp3PRO
     308* Support for PSD
     309* Support for JPC
     310* Support for JP2
     311* Support for JPX
     312* Support for JB2
     313* Support for IFF
     314* Support for ICO
     315* Support for ANI
     316* Support for EXE (comments, author, etc) (thanks p*quaedackersØplanet*nl)
     317* Support for DVD-IFO (region, subtitles, aspect ratio, etc)
     318  (thanks p*quaedackersØplanet*nl)
     319* More complete support for SWF - parsing encapsulated MP3 and/or JPEG content
     320    (thanks n8n8Øyahoo*com)
     321* Support for a2b
     322* Optional scan-through-frames for AVI verification
     323  (thanks rockcohenØmassive-interactive*nl)
     324* Support for TTF (thanks infoØbutterflyx*com)
     325* Support for DSS (http://www.getid3.org/phpBB3/viewtopic.php?t=171)
     326* Support for SMAF (http://smaf-yamaha.com/what/demo.html)
     327  http://www.getid3.org/phpBB3/viewtopic.php?t=182
     328* Support for AMR (http://www.getid3.org/phpBB3/viewtopic.php?t=195)
     329* Support for 3gpp (http://www.getid3.org/phpBB3/viewtopic.php?t=195)
     330* Support for ID4 (http://www.wackysoft.cjb.net grizlyY2KØhotmail*com)
     331* Parse XML data returned in Ogg comments
     332* Parse XML data from Quicktime SMIL metafiles (klausrathØmac*com)
     333* ID3v2 genre string creator function
     334* More complete parsing of JPG
     335* Support for all old-style ASF packets
     336* ASF/WMA/WMV tag writing
     337* Parse declared T??? ID3v2 text information frames, where appropriate
     338    (thanks Christian Fritz for the idea)
     339* Recognize encoder:
     340  http://www.guerillasoft.com/EncSpot2/index.html
     341  http://ff123.net/identify.html
     342  http://www.hydrogenaudio.org/?act=ST&f=16&t=9414
     343  http://www.hydrogenaudio.org/?showtopic=11785
     344* Support for other OS/2 bitmap structures: Bitmap Array('BA'),
     345  Color Icon('CI'), Color Pointer('CP'), Icon('IC'), Pointer ('PT')
     346  http://netghost.narod.ru/gff/graphics/summary/os2bmp.htm
     347* Support for WavPack RAW mode
     348* ASF/WMA/WMV data packet parsing
     349* ID3v2FrameFlagsLookupTagAlter()
     350* ID3v2FrameFlagsLookupFileAlter()
     351* obey ID3v2 tag alter/preserve/discard rules
     352* http://www.geocities.com/SiliconValley/Sector/9654/Softdoc/Illyrium/Aolyr.htm
     353* proper checking for LINK/LNK frame validity in ID3v2 writing
     354* proper checking for ASPI-TLEN frame validity in ID3v2 writing
     355* proper checking for COMR frame validity in ID3v2 writing
     356* http://www.geocities.co.jp/SiliconValley-Oakland/3664/index.html
     357* decode GEOB ID3v2 structure as encoded by RealJukebox,
     358  decode NCON ID3v2 structure as encoded by MusicMatch
     359  (probably won't happen - the formats are proprietary)
     360
     361
     362
     363Known Bugs/Issues in getID3() that may be fixed eventually
     364===========================================================================
     365http://www.getid3.org/phpBB3/viewtopic.php?t=25
     366
     367* Cannot determine bitrate for MPEG video with VBR video data
     368  (need documentation)
     369* Interlace/progressive cannot be determined for MPEG video
     370  (need documentation)
     371* MIDI playtime is sometimes inaccurate
     372* AAC-RAW mode files cannot be identified
     373* WavPack-RAW mode files cannot be identified
     374* mp4 files report lots of "Unknown QuickTime atom type"
     375   (need documentation)
     376* Encrypted ASF/WMA/WMV files warn about "unhandled GUID
     377  ASF_Content_Encryption_Object"
     378* Bitrate split between audio and video cannot be calculated for
     379  NSV, only the total bitrate. (need documentation)
     380* All Ogg formats (Vorbis, OggFLAC, Speex) are affected by the
     381  problem of large VorbisComments spanning multiple Ogg pages, but
     382  but only OggVorbis files can be processed with vorbiscomment.
     383* The version of "head" supplied with Mac OS 10.2.8 (maybe other
     384  versions too) does only understands a single option (-n) and
     385  therefore fails. getID3 ignores this and returns wrong md5_data.
     386
     387
     388
     389Known Bugs/Issues in getID3() that cannot be fixed
     390--------------------------------------------------
     391http://www.getid3.org/phpBB3/viewtopic.php?t=25
     392
     393* 32-bit PHP installations only:
     394  Files larger than 2GB cannot always be parsed fully by getID3()
     395  due to limitations in the 32-bit PHP filesystem functions.
     396  NOTE: Since v1.7.8b3 there is partial support for larger-than-
     397  2GB files, most of which will parse OK, as long as no critical
     398  data is located beyond the 2GB offset.
     399  Known will-work:
     400  * all file formats on 64-bit PHP
     401  * ZIP  (format doesn't support files >2GB)
     402  * FLAC (current encoders don't support files >2GB)
     403  Known will-not-work:
     404  * ID3v1 tags (always located at end-of-file)
     405  * Lyrics3 tags (always located at end-of-file)
     406  * APE tags (always located at end-of-file)
     407  Maybe-will-work:
     408  * Quicktime (will work if needed metadata is before 2GB offset,
     409    that is if the file has been hinted/optimized for streaming)
     410  * RIFF.WAV (should work fine, but gives warnings about not being
     411    able to parse all chunks)
     412  * RIFF.AVI (playtime will probably be wrong, is only based on
     413    "movi" chunk that fits in the first 2GB, should issue error
     414    to show that playtime is incorrect. Other data should be mostly
     415    correct, assuming that data is constant throughout the file)
     416
     417
     418
     419Known Bugs/Issues in other programs
     420-----------------------------------
     421http://www.getid3.org/phpBB3/viewtopic.php?t=25
     422
     423* Windows Media Player (up to v11) and iTunes (up to v10+) do
     424    not correctly handle ID3v2.3 tags with UTF-16BE+BOM
     425    encoding (they assume the data is UTF-16LE+BOM and either
     426    crash (WMP) or output Asian character set (iTunes)
     427* Winamp (up to v2.80 at least) does not support ID3v2.4 tags,
     428    only ID3v2.3
     429    see: http://forums.winamp.com/showthread.php?postid=387524
     430* Some versions of Helium2 (www.helium2.com) do not write
     431    ID3v2.4-compliant Frame Sizes, even though the tag is marked
     432    as ID3v2.4)  (detected by getID3())
     433* MP3ext V3.3.17 places a non-compliant padding string at the end
     434    of the ID3v2 header. This is supposedly fixed in v3.4b21 but
     435    only if you manually add a registry key. This fix is not yet
     436    confirmed.  (detected by getID3())
     437* CDex v1.40 (fixed by v1.50b7) writes non-compliant Ogg comment
     438    strings, supposed to be in the format "NAME=value" but actually
     439    written just "value"  (detected by getID3())
     440* Oggenc 0.9-rc3 flags the encoded file as ABR whether it's
     441    actually ABR or VBR.
     442* iTunes (versions "X v2.0.3", "v3.0.1" are known-guilty, probably
     443    other versions are too) writes ID3v2.3 comment tags using a
     444    frame name 'COM ' which is not valid for ID3v2.3+ (it's an
     445    ID3v2.2-style frame name)  (detected by getID3())
     446* MP2enc does not encode mono CBR MP2 files properly (half speed
     447    sound and double playtime)
     448* MP2enc does not encode mono VBR MP2 files properly (actually
     449    encoded as stereo)
     450* tooLAME does not encode mono VBR MP2 files properly (actually
     451    encoded as stereo)
     452* AACenc encodes files in VBR mode (actually ABR) even if CBR is
     453   specified
     454* AAC/ADIF - bitrate_mode = cbr for vbr files
     455* LAME 3.90-3.92 prepends one frame of null data (space for the
     456  LAME/VBR header, but it never gets written) when encoding in CBR
     457  mode with the DLL
     458* Ahead Nero encodes TwinVQF with a DSIZ value (which is supposed
     459  to be the filesize in bytes) of "0" for TwinVQF v1.0 and "1" for
     460  TwinVQF v2.0  (detected by getID3())
     461* Ahead Nero encodes TwinVQF files 1 second shorter than they
     462  should be
     463* AAC-ADTS files are always actually encoded VBR, even if CBR mode
     464  is specified (the CBR-mode switches on the encoder enable ABR
     465  mode, not CBR as such, but it's not possible to tell the
     466  difference between such ABR files and true VBR)
     467* STREAMINFO.audio_signature in OggFLAC is always null. "The reason
     468  it's like that is because there is no seeking support in
     469  libOggFLAC yet, so it has no way to go back and write the
     470  computed sum after encoding. Seeking support in Ogg FLAC is the
     471  #1 item for the next release." - Josh Coalson (FLAC developer)
     472  NOTE: getID3() will calculate md5_data in a method similar to
     473  other file formats, but that value cannot be compared to the
     474  md5_data value from FLAC data in a FLAC file format.
     475* STREAMINFO.audio_signature is not calculated in FLAC v0.3.0 &
     476  v0.4.0 - getID3() will calculate md5_data in a method similar to
     477  other file formats, but that value cannot be compared to the
     478  md5_data value from FLAC v0.5.0+
     479* RioPort (various versions including 2.0 and 3.11) tags ID3v2 with
     480  a WCOM frame that has no data portion
     481* Earlier versions of Coolplayer adds illegal ID3 tags to Ogg Vorbis
     482  files, thus making them corrupt.
     483* Meracl ID3 Tag Writer v1.3.4 (and older) incorrectly truncates the
     484  last byte of data from an MP3 file when appending a new ID3v1 tag.
     485  (detected by getID3())
     486* Lossless-Audio files encoded with and without the -noseek switch
     487  do actually differ internally and therefore cannot match md5_data
     488* iTunes has been known to append a new ID3v1 tag on the end of an
     489  existing ID3v1 tag when ID3v2 tag is also present
     490  (detected by getID3())
     491* MediaMonkey may write a blank RGAD ID3v2 frame but put actual
     492  replay gain adjustments in a series of user-defined TXXX frames
     493  (detected and handled by getID3() since v1.9.2)
     494
     495
     496
     497
     498Reference material:
     499===========================================================================
     500
     501[www.id3.org material now mirrored at http://id3lib.sourceforge.net/id3/]
     502* http://www.id3.org/id3v2.4.0-structure.txt
     503* http://www.id3.org/id3v2.4.0-frames.txt
     504* http://www.id3.org/id3v2.4.0-changes.txt
     505* http://www.id3.org/id3v2.3.0.txt
     506* http://www.id3.org/id3v2-00.txt
     507* http://www.id3.org/mp3frame.html
     508* http://minnie.tuhs.org/pipermail/mp3encoder/2001-January/001800.html <mathewhendry@hotmail.com>
     509* http://www.dv.co.yu/mpgscript/mpeghdr.htm
     510* http://www.mp3-tech.org/programmer/frame_header.html
     511* http://users.belgacom.net/gc247244/extra/tag.html
     512* http://gabriel.mp3-tech.org/mp3infotag.html
     513* http://www.id3.org/iso4217.html
     514* http://www.unicode.org/Public/MAPPINGS/ISO8859/8859-1.TXT
     515* http://www.xiph.org/ogg/vorbis/doc/framing.html
     516* http://www.xiph.org/ogg/vorbis/doc/v-comment.html
     517* http://leknor.com/code/php/class.ogg.php.txt
     518* http://www.id3.org/iso639-2.html
     519* http://www.id3.org/lyrics3.html
     520* http://www.id3.org/lyrics3200.html
     521* http://www.psc.edu/general/software/packages/ieee/ieee.html
     522* http://www.scri.fsu.edu/~jac/MAD3401/Backgrnd/ieee-expl.html
     523* http://www.scri.fsu.edu/~jac/MAD3401/Backgrnd/binary.html
     524* http://www.jmcgowan.com/avi.html
     525* http://www.wotsit.org/
     526* http://www.herdsoft.com/ti/davincie/davp3xo2.htm
     527* http://www.mathdogs.com/vorbis-illuminated/bitstream-appendix.html
     528* "Standard MIDI File Format" by Dustin Caldwell (from www.wotsit.org)
     529* http://midistudio.com/Help/GMSpecs_Patches.htm
     530* http://www.xiph.org/archives/vorbis/200109/0459.html
     531* http://www.replaygain.org/
     532* http://www.lossless-audio.com/
     533* http://download.microsoft.com/download/winmediatech40/Doc/1.0/WIN98MeXP/EN-US/ASF_Specification_v.1.0.exe
     534* http://mediaxw.sourceforge.net/files/doc/Active%20Streaming%20Format%20(ASF)%201.0%20Specification.pdf
     535* http://www.uni-jena.de/~pfk/mpp/sv8/ (archived at http://www.hydrogenaudio.org/musepack/klemm/www.personal.uni-jena.de/~pfk/mpp/sv8/)
     536* http://jfaul.de/atl/
     537* http://www.uni-jena.de/~pfk/mpp/ (archived at http://www.hydrogenaudio.org/musepack/klemm/www.personal.uni-jena.de/~pfk/mpp/)
     538* http://www.libpng.org/pub/png/spec/png-1.2-pdg.html
     539* http://www.real.com/devzone/library/creating/rmsdk/doc/rmff.htm
     540* http://www.fastgraph.com/help/bmp_os2_header_format.html
     541* http://netghost.narod.ru/gff/graphics/summary/os2bmp.htm
     542* http://flac.sourceforge.net/format.html
     543* http://www.research.att.com/projects/mpegaudio/mpeg2.html
     544* http://www.audiocoding.com/wiki/index.php?page=AAC
     545* http://libmpeg.org/mpeg4/doc/w2203tfs.pdf
     546* http://www.geocities.com/xhelmboyx/quicktime/formats/qtm-layout.txt
     547* http://developer.apple.com/techpubs/quicktime/qtdevdocs/RM/frameset.htm
     548* http://www.nullsoft.com/nsv/
     549* http://www.wotsit.org/download.asp?f=iso9660
     550* http://sandbox.mc.edu/~bennet/cs110/tc/tctod.html
     551* http://www.cdroller.com/htm/readdata.html
     552* http://www.speex.org/manual/node10.html
     553* http://www.harmony-central.com/Computer/Programming/aiff-file-format.doc
     554* http://www.faqs.org/rfcs/rfc2361.html
     555* http://ghido.shelter.ro/
     556* http://www.ebu.ch/tech_t3285.pdf
     557* http://www.sr.se/utveckling/tu/bwf
     558* http://ftp.aessc.org/pub/aes46-2002.pdf
     559* http://cartchunk.org:8080/
     560* http://www.broadcastpapers.com/radio/cartchunk01.htm
     561* http://www.hr/josip/DSP/AudioFile2.html
     562* http://home.attbi.com/~chris.bagwell/AudioFormats-11.html
     563* http://www.pure-mac.com/extkey.html
     564* http://cesnet.dl.sourceforge.net/sourceforge/bonkenc/bonk-binary-format-0.9.txt
     565* http://www.headbands.com/gspot/
     566* http://www.openswf.org/spec/SWFfileformat.html
     567* http://j-faul.virtualave.net/
     568* http://www.btinternet.com/~AnthonyJ/Atari/programming/avr_format.html
     569* http://cui.unige.ch/OSG/info/AudioFormats/ap11.html
     570* http://sswf.sourceforge.net/SWFalexref.html
     571* http://www.geocities.com/xhelmboyx/quicktime/formats/qti-layout.txt
     572* http://www-lehre.informatik.uni-osnabrueck.de/~fbstark/diplom/docs/swf/Flash_Uncovered.htm
     573* http://developer.apple.com/quicktime/icefloe/dispatch012.html
     574* http://www.csdn.net/Dev/Format/graphics/PCD.htm
     575* http://tta.iszf.irk.ru/
     576* http://www.atsc.org/standards/a_52a.pdf
     577* http://www.alanwood.net/unicode/
     578* http://www.freelists.org/archives/matroska-devel/07-2003/msg00010.html
     579* http://www.its.msstate.edu/net/real/reports/config/tags.stats
     580* http://homepages.slingshot.co.nz/~helmboy/quicktime/formats/qtm-layout.txt
     581* http://brennan.young.net/Comp/LiveStage/things.html
     582* http://www.multiweb.cz/twoinches/MP3inside.htm
     583* http://www.geocities.co.jp/SiliconValley-Oakland/3664/alittle.html#GenreExtended
     584* http://www.mactech.com/articles/mactech/Vol.06/06.01/SANENormalized/
     585* http://www.unicode.org/unicode/faq/utf_bom.html
     586* http://tta.corecodec.org/?menu=format
     587* http://www.scvi.net/nsvformat.htm
     588* http://pda.etsi.org/pda/queryform.asp
     589* http://cpansearch.perl.org/src/RGIBSON/Audio-DSS-0.02/lib/Audio/DSS.pm
     590* http://trac.musepack.net/trac/wiki/SV8Specification
     591* http://wyday.com/cuesharp/specification.php
     592* http://www.sno.phy.queensu.ca/~phil/exiftool/TagNames/Nikon.html