Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
MP3 ID3 TAG - Pleas Read this
Old 08-16-2010, 02:55 AM MP3 ID3 TAG - Pleas Read this
Novice Talker

Posts: 5
Name: arlind
Trades: 0
Hi, i have a upload form to my website and people can upload mp3 (loops for piano) but how can i change the ID3 TAGS: Album, Artist, cover picture, etc

here is my upload form

INDEX.HTML

<form action="upload.php" method="post" enctype="multipart/form-data">
File: <input type="file" name="file" size="30"> <input type="submit" value="Upload">
</form>


UPLOAD.PHP

<?php
// ==============
// Configuration
// ==============
$uploaddir = "uploads/images"; // Where you want the files to upload to - Important: Make sure this folders permissions is 0777!
$allowed_ext = "jpg, JPG, jpeg, JPEG, gif, GIF, bmp, BMP, PNG, MP3"; // These are the allowed extensions of the files that are uploaded
$max_size = "1500000"; // 50000 is the same as 50kb
$max_height = "250"; // This is in pixels - Leave this field empty if you don't want to upload images
$max_width = "230"; // This is in pixels - Leave this field empty if you don't want to upload images
// Check Entension
$extension = pathinfo($_FILES['file']['name']);
$extension = $extension[extension];
$allowed_paths = explode(", ", $allowed_ext);
for($i = 0; $i < count($allowed_paths); $i++) {
if ($allowed_paths[$i] == "$extension") {
$ok = "1";
}
}
// Check File Size
if ($ok == "1") {
if($_FILES['file']['size'] > $max_size)
{
print "Nuk pranohen foto me madhsi mbi 1.5 MB!";
exit;
}
// Check Height & Width
if ($max_width && $max_height) {
list($width, $height, $type, $w) =
getimagesize($_FILES['file']['tmp_name']);
if($width > $max_width || $height > $max_height)
{
print "Rezulucioni i fotografise eshte teper i madh!";
exit;
}
}
// The Upload Part
if(is_uploaded_file($_FILES['file']['tmp_name']))
{
move_uploaded_file($_FILES['file']['tmp_name'],$uploaddir.'/'.$_FILES['file']['name']);
}
print "Fotografia juaj u dergua me sukses, ajo do te vendohet ne web faqe pasi tė aprovohet nga Administratoret !";
} else {
print "Ju mund te ngarkoni vetem foto: Jpg, gif, bmp, png, mp3!";
}
?>








What I Need to write in this code to make aoutomatic change the ID3 tags EXAPMLE:


If someone upload a MP3 called piano how can ID3 tags change automatically: The album, Artist, etc. To change to mysite.com




REMOVED

Last edited by chrishirst; 08-17-2010 at 04:38 PM..
webmaster000 is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 08-16-2010, 05:50 AM Re: MP3 ID3 TAG - Pleas Read this
Super Talker

Posts: 139
Name: John Davis
Trades: 0
http://www.php.net/id3
__________________
»
Please login or register to view this content. Registration is FREE
- Interactive maps for websites
»
Please login or register to view this content. Registration is FREE
for web developers
MapMaster is offline
Reply With Quote
View Public Profile Visit MapMaster's homepage!
 
Reply     « Reply to MP3 ID3 TAG - Pleas Read this
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 1.32849 seconds with 12 queries