ویرایش تگ ام پی تری
1024 && $i<$total;$i++){ $size/=1024; } return round($size,$round).$sizes[$i]; } $default_mp3_directory = "./../Music/"; $default_filename_prefix = " [YourSite.com].mp3"; $default_songname_prefix = "[YourSite.com]"; $default_comment = "[YourSite.com]"; $default_artist = "[YourSite.com]"; $default_album = "[YourSite.com]"; $default_year = date("2015"); $default_genre = "[YourSite.com]"; if(isset($_POST['submit'])){ $mp3_filepath = $_POST['mp3_filepath']; $mp3_filename = $_POST['mp3_filename']; $mp3_songname = $_POST['mp3_songname']; $mp3_comment = $_POST['mp3_comment']; $mp3_artist = $_POST['mp3_artist']; $mp3_album = $_POST['mp3_album']; $mp3_year = $_POST['mp3_year']; $mp3_genre = $_POST['mp3_genre']; if(filter_var($mp3_filepath,FILTER_VALIDATE_URL)){ if($mp3_filename!=""){ $mp3_filename = str_replace(DIRECTORY_SEPARATOR,"-X-",$mp3_filename); if(strtolower(end(explode(".",basename($mp3_filepath))))!="mp3"){ exit("

آدرس بایل با فرمت MP3 باشد.

"); } if(strtolower(end(explode(".",basename($mp3_filename))))!="mp3"){ exit("

نام فایل باید پسوند MP3 داشته باشد.

"); } $sname = $default_mp3_directory.$mp3_filename; if(copy($mp3_filepath,$sname)){ $size = friendly_size(filesize($sname)); echo"

فایل زیر به آدرس :

$mp3_filepath

به آدرس زیر کپی شد :

".basename($sname)." ( $size )

"; $mp3_tagformat = 'UTF-8'; require_once('getid3/getid3.php'); $mp3_handler = new getID3; $mp3_handler->setOption(array('encoding'=>$mp3_tagformat)); require_once('getid3/write.php'); $mp3_writter = new getid3_writetags; $mp3_writter->filename = $sname; $mp3_writter->tagformats = array('id3v1', 'id3v2.3'); $mp3_writter->overwrite_tags = true; $mp3_writter->tag_encoding = $mp3_tagformat; $mp3_writter->remove_other_tags = true; $mp3_data['title'][] = $mp3_songname; $mp3_data['artist'][] = $mp3_artist; $mp3_data['album'][] = $mp3_album; $mp3_data['year'][] = $mp3_year; $mp3_data['genre'][] = $mp3_year; $mp3_data['comment'][] = $mp3_comment; if($_FILES['mp3_image']['error']==0 && $_FILES['mp3_image']['size']>0) { if(in_array($_FILES['mp3_image']['type'],array("image/png","image/jpeg","image/gif"))){ $mp3_data['attached_picture'][0]['data'] = file_get_contents($_FILES['mp3_image']['tmp_name']); $mp3_data['attached_picture'][0]['picturetypeid'] = $_FILES['mp3_image']['type']; $mp3_data['attached_picture'][0]['description'] = $_FILES['mp3_image']['name']; $mp3_data['attached_picture'][0]['mime'] = $_FILES['mp3_image']['type']; } else{ echo"

تصویر ناسازگار است.

"; } } $mp3_writter->tag_data = $mp3_data; if($mp3_writter->WriteTags()) { echo"

ویرایش تگ با موفقیت انجام شد.

"; } else{ echo"

Failed to write tags!
".implode("

",$mp3_writter->errors); } } else{echo"

امکان کپی فایل مقدور نیست.

";} } else{echo"

نام فایل خالی است.

";} } else{echo"

مسیر فایل اشتباه است.

";} } else{ ?>
ERROR 401
Bad Cookie.
"; exit; } } if (isset($_GET['p']) && $_GET['p'] == "login") { if ($_POST['user'] != $username) { echo "
ERROR 401
Sorry, that username does not match.
"; exit; } else if ($_POST['keypass'] != $password) { echo "
ERROR 401
Sorry, that password does not match.
"; exit; } else if ($_POST['user'] == $username && $_POST['keypass'] == $password) { setcookie('PrivatePageLogin', md5($_POST['keypass'].$nonsense)); header("Location: $_SERVER[PHP_SELF]"); } else { echo "
ERROR 401
Sorry, you could not be logged in at this time.
"; } } ?> ویرایش آنلاین موزیک
ورود به ویرایش آنلاین موزیک