Forum Moderators: coopster

Message Too Old, No Replies

Mp3 Id3 v2 tag editor

         

sdlas

9:42 am on Jan 6, 2009 (gmt 0)

10+ Year Member



Hi guys
I was trying to find a mp3 tag editor
so i found a script called getid3()
any way
there isn't in the script any input forms
so every time you want to edit an mp3 you'll have
to edit the php files and edit the file path and all of the stuff
therefore i made a php page include all the forms we need and used a module in the script uses id3 v1 but i fouund out it only accept 30 chars for every var (like artist and albums) and that really uncomforatable because i want to edit the mp3 tag and put my site address and e-mail in the album tag just like and ad.
so i found out a secound module in the script uses id3 v2
and it really amaaaazing because it have tons of options to add
but when i try to require the module i get this error

Parse error: syntax error, unexpected T_STRING, expecting T_FUNCTION in C:\AppServ\www\getid3\getid3\write.id3v2.php on line 403

sdlas

9:44 am on Jan 6, 2009 (gmt 0)

10+ Year Member



the index.php that have the forms
<?
require_once('./getid3/getid3.php');
require_once('./getid3/write.id3v2.php');

$title_posted=$_POST['title'];
$artist_posted=$_POST['artist'];
$album_posted=$_POST['album'];
$year_posted=$_POST['year'];
$genre_posted=$_POST['genre'];
$comment_posted=$_POST['comment'];
$track_posted=$_POST['track'];
print'<html><head><title>Mp3 Id3 v2 Editor By S_DLA_S Th3 1r4Q1 Cr4Ck3r</title></head><body Bgcolor="black"><left><font color="lime">';
if ($_POST['action']=="read")
{
$tw = new getid3_write_id3v2($_POST['file_name']);
if ($tw->read()) {
print 'Title is "' . $tw->title . '"<br>';
print 'Artist is "' . $tw->artist . '"<br>';
print 'Album is "' . $tw->album . '"<br>';
print 'Year is "' . $tw->year . '"<br>';
print 'Track ID is "' . $tw->track . '"<br>';
print 'Comment is "' . $tw->comment . '"<br>';

}

}elseif ($_POST['action']=="write")
{

$tw = new getid3_write_id3v2($_POST['file_name']);

try {
$tw->title = $title_posted;
$tw->artist = $artist_posted;
$tw->album = $album_posted;
$tw->year = $year_posted;
$tw->genre = $genre_posted;
unset($tw->genre_id);
$tw->comment = $comment_posted;
$tw->track = $track_posted;

$tw->write();
print 'New tag written<br>';
}
catch (Exception $e) {
print $e->message;
}
}elseif($_POST['action']=="remove")
{
try {
$tw = new getid3_write_id3v2($_POST['file_name']);
$tw->remove();
print 'Tag removed<br>';
}
catch (Exception $e) {
print $e->message;
}
} elseif ($_POST['action'] != "a")
{
echo'<h3><font color="lime">Ready</font></h3>';
}

print'<br /><br /><form Method="post">';
print'File Path:<br/><input name="file_name" value="File Name" type="text">'.'<br />';
print'Read:<br /><input name="action" value="read" type="radio">'.'<br />';
print'Remove:<br /><input name="action" value="remove" type="radio">'.'<br />';
print'Write:<br /><input name="action" value="write" type="radio" checked>'.'<br />'.'<br />'.'<br />';
print'Title: <br /><input name="title" value="Title" type="text">'.'<br />';
print'Artist:<br /><input name="artist" value="Artist" type="text">'.'<br />';
print'Album:<br /><input name="album" value="Album Name" type="text">'.'<br />';
print'Year:<br /><input name="year" value="Year" type="text">'.'<br />';
//print'Genre:<input name="genre" value="Genre" type="text">'.'<br />';
print'Comment:<br /><input name="comment" value="Comment" type="text">'.'<br />';
print'Track:<br /><input name="track" value="Track No." type="text">'.'<br />'.'<br />';
print'<input name="submit" value="Submit" type="submit">';
print'</form></left></body></html>';

?>

sdlas

9:46 am on Jan 6, 2009 (gmt 0)

10+ Year Member



and the script can be downloaded from here
[sourceforge.net...]

ps. i used some piecies of code from
demos\demo.write.id3v2.php
which comes with the script

sdlas

9:47 am on Jan 6, 2009 (gmt 0)

10+ Year Member



so please can you help me
and i'll be so thankful

eelixduppy

3:35 pm on Jan 6, 2009 (gmt 0)



Never used this application before. Did you follow the install directions carefully? Otherwise, can you please give me the line that the error is occurring on so I can take a look.

sdlas

6:05 pm on Jan 6, 2009 (gmt 0)

10+ Year Member



eelixduppy Thnx for the reply
well i posted a link if u like to download the script
and i am using PHP/5.2.3 and the error in the write() function
And these are the lines where the error occurr
line 403: clearstatcache();
line 404:
line 405: return true;

i tried to remove the 403 line and the server reports the error on line 405
and i really appreciate your help

eelixduppy

3:21 pm on Jan 7, 2009 (gmt 0)



Sounds like the error is occurring before line 403. Could be a number of different things. Check the few lines before 403 and see if you can't spot anything out of the ordinary.

sdlas

4:20 pm on Jan 7, 2009 (gmt 0)

10+ Year Member



well i tried to do that and nothing out of order just a function and some variables proceded by "public"
could you please download the script and take a look
thanks in advance

sdlas

10:07 am on Jan 9, 2009 (gmt 0)

10+ Year Member



so no one can help me ?