/////////////////////////////////////////////////////////////////
/// getID3() by James Heinrich <info@getid3.org> //
// available at http://getid3.sourceforge.net //
// or http://www.getid3.org ///
/////////////////////////////////////////////////////////////////
/// getID3() v2.x optimized for PHP5 by: //
// Allan Hansen <ahØartemis*dk> ///
/////////////////////////////////////////////////////////////////
This code is released under the GNU GPL:
http://www.gnu.org/copyleft/gpl.html
+---------------------------------------------+
| If you do use this code somewhere, send me |
| an email and tell me how/where you used it. |
| |
| If you want to donate, there is a link on |
| http://www.getid3.org for PayPal donations. |
+---------------------------------------------+
Quick Start
===========
Q: How can I check that getID3() works on my server/files?
A: Unzip getID3() to a directory, then access /demos/demo.browse.php
Sourceforge Notification
========================
It's highly recommended that you sign up for notification from
Sourceforge for when new versions are released. Please visit:
http://sourceforge.net/project/showfiles.php?group_id=55859
and click the little "monitor package" icon/link. If you're
previously signed up for the mailing list, be aware that it has
been discontinued, only the automated Sourceforge notification
will be used from now on.
What does getID3() do?
======================
Reads & parses (to varying degrees):
¤ tags:
* APE (v1 and v2)
* ID3v1 (& ID3v1.1)
* ID3v2 (v2.4, v2.3, v2.2)
* Lyrics3 (v1 & v2)
¤ audio-lossy:
* MP3/MP2/MP1
* MPC / Musepack
* Ogg (Vorbis, OggFLAC, Speex)
* RealAudio
* Speex
* VQF
¤ audio-lossless:
* AIFF
* AU
* Bonk
* CD-audio (*.cda)
* FLAC
* LA (Lossless Audio)
* LPAC
* MIDI
* Monkey's Audio
* OptimFROG
* RKAU
* VOC
* WAV (RIFF)
* WavPack
¤ audio-video:
* ASF: ASF, Windows Media Audio (WMA), Windows Media Video (WMV)
* AVI (RIFF)
* Flash
* MPEG-1 / MPEG-2
* NSV (Nullsoft Streaming Video)
* Quicktime
* RealVideo
¤ still image:
* BMP
* GIF
* JPEG
* PNG
¤ data:
* ISO-9660 CD-ROM image (directory structure)
* SZIP (limited support)
* ZIP (directory structure)
Writes:
* ID3v1 (& ID3v1.1)
* ID3v2 (v2.3 & v2.4)
* VorbisComment on OggVorbis
* VorbisComment on FLAC (not OggFLAC)
* APE v2
* Lyrics3 (delete only)
Requirements
============
* PHP 4.1.0 (or higher)
* at least 4MB memory for PHP. 8MB is highly recommended.
12MB is required with all modules loaded.
Usage
=====
require_once('/path/getid3.php');
$getID3 = new getID3;
$fileinfo = $getID3->analyze($filename);
See structure.txt for the returned data structure.
*> For an example of a complete directory-browsing, <*
*> file-scanning implementation of getID3(), please run <*
*> /demos/demo.browse.php <*
See /demos/demo.basic.php for a very basic use of getID3() with no
fancy output, just scanning one file.
See /demos/demo.mysql.php for a sample recursive scanning code that
scans every file in a given directory, and all sub-directories, stores
the results in a database and allows various analysis / maintenance
operations
See /demos/demo.simple.php for a simple example script that scans all
files in one directory and output artist, title, bitrate and playtime
See /demos/demo.mimeonly.php for a simple example script that scans a
single file and returns only the MIME information
To analyze remote files over HTTP or FTP you need to copy the file
locally first before running getID3(). Your code would look something
like this:
// Copy remote file locally to scan with getID3()
$remotefilename = 'http://www.example.com/filename.mp3';
if ($fp_remote = fopen($remotefilename, 'rb')) {
$localtempfilename = tempnam('/tmp', 'getID3');
if ($fp_local = fopen($localtempfilename, 'wb')) {
while ($buffer = fread($fp_remote, 8192)) {
fwrite($fp_local, $buffer);
}
fclose($fp_local);
// Initialize getID3 engine
$getID3 = new getID3;
$ThisFileInfo = $getID3->analyze($filename);
// Delete temporary file
unlink($localtempfilename);
}
fclose($fp_remote);
}
// Writing tags:
require_once('getid3.php');
$getID3 = new getID3;
getid3_lib::IncludeDependency(GETID3_INCLUDEPATH.'write.php', __FILE__);
$tagwriter = new getid3_writetags;
$tagwriter->filename = $Filename;
$tagwriter->tagformats = array('id3v2.3', 'ape');
$TagData['title'][] = 'Song Title';
$TagData['artist'][] = 'Artist Name';
$tagwriter->tag_data = array(;
if ($tagwriter->WriteTags()) {
echo 'success';
} else {
echo 'failure';
}
What does the returned data structure look like?
================================================
See structure.txt
It is recommended that you look at the output of
/demos/demo.browse.php scanning the file(s) you're interested in to
confirm what data is actually returned for any particular filetype in
general, and your files in particular, as the actual data returned
may vary considerably depending on what information is available in
the file itself.
Notes
=====
If the format parser encounters a critical problem, it will return
something in $fileinfo['error'], describing the encountered error. If
a less critical error or notice is generated it will appear in
$fileinfo['warning']. Both keys may contain more than one warning or
error. If something is returned in ['error'] then the file was not
correctly parsed and returned data may or may not be correct and/or
complete. If something is returned in ['warning'] (and not ['error'])
then the data that is returned is OK - usually getID3() is reporting
errors in the file that have been worked around due to known bugs in
other programs. Some warnings may indicate that the data that is
returned is OK but that some data could not be extracted due to
errors in the file.
Known Bugs/Issues
=================
See the end of changelog.txt for notes on known issues with
getID3(), encoders, players, etc.
Disclaimer
==========
getID3() has been tested on many systems, on many types of files,
under many operating systems, and is generally believe to be stable
and safe. That being said, there is still the chance there is an
undiscovered and/or unfixed bug that may potentially corrupt your
file, especially within the writing functions. By using getID3() you
agree that it's not my fault if any of your files are corrupted.
In fact, I'm not liable for anything :)
/////////////////////////////////////////////////////////////////////
GNU General Public License - see license.txt
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to:
Free Software Foundation, Inc.
59 Temple Place - Suite 330
Boston, MA 02111-1307, USA.
FAQ:
Q: Can I use getID3() in my program? Do I need a commercial license?
A: You're generally free to use getID3 however you see fit. The only
case in which you would require a commercial license is if you're
selling your closed-source program that integrates getID3. If you
sell your program including a copy of getID3, that's fine as long
as you include a copy of the sourcecode when you sell it. Or you
can distribute your code without getID3 an
没有合适的资源?快使用搜索试试~ 我知道了~
phpwebsite 1.6.2_phpwebsite_1_6_2_CMS程序开发模板(使用说明+源代码+html).zip
共2000个文件
js:436个
php:315个
tpl:270个
0 下载量 66 浏览量
2024-04-20
03:12:43
上传
评论
收藏 8.71MB ZIP 举报
温馨提示
【项目资源】:包含前端、后端、移动开发、操作系统、人工智能、物联网、信息化管理、数据库、硬件开发、大数据、课程资源、音视频、网站开发等各种技术项目的源码。包括STM32、ESP8266、PHP、QT、Linux、iOS、C++、Java、python、web、C#、EDA、proteus、RTOS等项目的源码。【项目质量】:所有源码都经过严格测试,可以直接运行。功能在确认正常工作后才上传。【适用人群】:适用于希望学习不同技术领域的小白或进阶学习者。可作为毕设项目、课程设计、大作业、工程实训或初期项目立项。【附加价值】:项目具有较高的学习借鉴价值,也可直接拿来修改复刻。对于有一定基础或热衷于研究的人来说,可以在这些基础代码上进行修改和扩展,实现其他功能。【沟通交流】:有任何使用上的问题,欢迎随时与博主沟通,博主会及时解答。鼓励下载和使用,并欢迎大家互相学习,共同进步。
资源推荐
资源详情
资源评论
收起资源包目录
phpwebsite 1.6.2_phpwebsite_1_6_2_CMS程序开发模板(使用说明+源代码+html).zip (2000个子文件)
RotatorView.as 14KB
ControlbarView.as 13KB
FLVModel.as 9KB
DisplayView.as 7KB
PlaylistView.as 7KB
FeedManager.as 7KB
RecommendationsView.as 6KB
Scroller.as 6KB
PlayerController.as 6KB
ImageLoader.as 5KB
RotatorController.as 4KB
RSSParser.as 4KB
CaptionsParser.as 4KB
MediaPlayer.as 4KB
ImageModel.as 4KB
AbstractParser.as 4KB
MP3Model.as 4KB
AbstractController.as 4KB
CaptionsView.as 4KB
Animations.as 3KB
AbstractModel.as 3KB
ATOMParser.as 3KB
EqualizerView.as 3KB
AudioView.as 3KB
ConfigManager.as 3KB
CallbackView.as 3KB
AbstractPlayer.as 2KB
JavascriptView.as 2KB
StringMagic.as 2KB
XSPFParser.as 2KB
BandwidthCheck.as 2KB
XMLParser.as 2KB
ImageRotator.as 2KB
AbstractView.as 2KB
ASXParser.as 2KB
InputView.as 1KB
Randomizer.as 849B
FeedListener.as 311B
AUTHORS 415B
CHANGELOG 33KB
CHANGELOG 15KB
CHANGELOG 11KB
CHANGELOG 9KB
CHANGELOG 9KB
CHANGELOG 5KB
CHANGELOG 3KB
CHANGELOG 3KB
CHANGELOG 3KB
CHANGELOG 2KB
CHANGELOG 2KB
CHANGELOG 2KB
CHANGELOG 2KB
CHANGELOG 1KB
CHANGELOG 1KB
CHANGELOG 955B
CHANGELOG 927B
CHANGELOG 612B
CHANGELOG 73B
COPYING 18KB
COPYRIGHT 339B
skin.css 48KB
jquery.css 27KB
editor.css 21KB
ui.css 15KB
ui.css 15KB
fck_editor.css 8KB
fck_editor.css 8KB
fck_editor.css 8KB
default.css 8KB
basic.css 7KB
window.css 6KB
tabview.css 6KB
basic.css 6KB
fck_dialog.css 6KB
fck_dialog.css 6KB
fck_dialog.css 6KB
dialog.css 5KB
dialog.css 5KB
datatable.css 5KB
menu.css 5KB
default.css 4KB
ui.datepicker.css 4KB
style.css 4KB
calendar.css 4KB
fck_internal.css 4KB
container.css 4KB
style.css 3KB
position.css 3KB
style.css 3KB
style.css 3KB
default.css 3KB
button.css 3KB
fullpage.css 3KB
style.css 3KB
fck_editorarea.css 3KB
blue.css 2KB
ui.css 2KB
style.css 2KB
colorpicker.css 2KB
dhtmlgoodies_calendar.css 2KB
共 2000 条
- 1
- 2
- 3
- 4
- 5
- 6
- 20
资源评论
大黄鸭duck.
- 粉丝: 2778
- 资源: 1万+
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功