Forum Moderators: coopster
Parse error: syntax error, unexpected T_STRING, expecting T_FUNCTION in C:\AppServ\www\getid3\getid3\write.id3v2.php on line 403
$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>';
?>
ps. i used some piecies of code from
demos\demo.write.id3v2.php
which comes with the script
i tried to remove the 403 line and the server reports the error on line 405
and i really appreciate your help