Jump to content

Recommended Posts

Hello Sirs/Madams

 

I am currently trying to program a sort of MySpace.

 

I need help.... your help!!

 

 

If you have the answers please do help!

 

 

I want to implement this:

 

* Users must be able to upload MP3

* Users must be able to change/edit songs

* It must be in session

* When other users click on their profile, they must be able to listen to their music.

 

 

THE MAIN ONE: implement MP3 Script for MysQL database

 

Please do let me know

 

With VERY VERY KIND REGARDS

THE FREEMAN :)

 

 

 

 

 

* When the user registers, create a folder for them where to upload music and photos. Make an upload form for the users to upload mp3s. U can add the uploaded mp3s to a database, meaning the path and any other information u need.

 

* Show each mp3 in that user's folder by a database query, with button to edit or delete them. Both the actions will affect the database and folder. Deleting a database record, deletes also the path of the mp3 the record had. Updating the database will also update the mp3 file.

 

* I dont know what u mean by being in session. What will have to be stored in sessions (temporary cookies)?

 

* Make a flash mp3 player or just get one. Flash is very balanced and powerful so im sure u wont have problems. It can also interact with php scripts for database queries and stuff. In this case u just need to make a nice looking flash mp3 player with pan, volume, and play stop buttons, and a simple script which loads songs from the folders.

 

Hope i gave some good advice.

* When the user registers, create a folder for them where to upload music and photos. Make an upload form for the users to upload mp3s. U can add the uploaded mp3s to a database, meaning the path and any other information u need.

 

* Show each mp3 in that user's folder by a database query, with button to edit or delete them. Both the actions will affect the database and folder. Deleting a database record, deletes also the path of the mp3 the record had. Updating the database will also update the mp3 file.

 

* I dont know what u mean by being in session. What will have to be stored in sessions (temporary cookies)?

 

* Make a flash mp3 player or just get one. Flash is very balanced and powerful so im sure u wont have problems. It can also interact with php scripts for database queries and stuff. In this case u just need to make a nice looking flash mp3 player with pan, volume, and play stop buttons, and a simple script which loads songs from the folders.

 

Hope i gave some good advice.

 

Does every user has to have there own folder? Or can every mp3 be in one folder?

Thank you very much it does make a lot of sense!!

 

Just a couple of questions:

 

1.) Does anyone know where I could learn how to create file upload for MP3s

2.) When The files gets uploaded (in a folder: http://www.mysite.com/mp3/), should I change the names i.e. blues.mp3 to some kind of encryption.mp3

or just keep it blues.mp3?

 

Can someone lead me into the direction to be able to implement it in more detail - THANKS ALL THE ANSWERS ARE GREAT!!!!

 

- Is there an online tutorial/upload MP3 - I need some help, I can read through anything and study all night if I must!

 

Thanks so MUCH!!!

uploading large amounts of media to your server is like dropping a turkey on your dog  (I saw it on mythbusters wasn't pretty)  you will eat up your bandwidth, hd space etc etc.  Also not to mention the inherited legal obligations to the media if it is their own property to distribute.  For that reason I'd suggest you store them in a protected manner, or not at all.

High Bandwidth is good, large amount of data is good.

 

I just need some kind of tutorial about Uploading MP3's, or someone to show me (if possible) how to code a basic upload (like uploading an image but instead an MP3)

 

If someone can be GREAT!!! ::)

all mp3s could be in one directory.

 

Actually having mp3s in folders for each user should just make a more structured file system. Each method brings the same results and theres no basic difference.

 

As cooldude said, letting users upload mp3s will eat a lot of bandwidth. If u have thousands of users, imagine them uploading 4-5 mp3s each. Even if standart shared hosts today offer a great amount of bandwidth (up to 100 GB and even more), consider the speed of processing. But these are your stuff anyway and im sure uve thought about it. Just be sure to configure php as needed, making the right adjustments to max upload, execution etc.

 

A simple file upload example, considering u just have a form (with enctype: multipart/formdata) and a submit button:

 

<?php
$filename = $_POST['file']['name'];
$ext = strtolower(substr(strrchr($filename, '.'), 1));
$size = $_POST['file']['size'];
if($ext == 'mp3'){
   if($size <= 5000000){
         if(move_uploaded_file($_POST['file']['tmp_name']), "songs/{$filename}"){
               echo "The file {$filename} was uploaded successfully.";
         } else{
               echo 'There was an error uploading your file. Please try again.';
         }
   } else{
         echo "The size of the song u chose is too big.";
   }
} else{
    echo 'The format u chose is either not supported or not a music file.';
}
?>

 

Hope it makes sense and fits what u need.

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.