Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 8 of 8
  1. #1
    New Coder
    Join Date
    Jan 2012
    Location
    Sweden
    Posts
    32
    Thanks
    7
    Thanked 0 Times in 0 Posts

    store music - need hint where to get started

    Hello there,

    I have a small problem. I want to store some music and let people who visit my website to hear the music when they press a "play" button. But the problem is, i have no idea where to start from. The only thing i know is that, i need a form in my html, where i create the button i guess? And i'm gonna use a database (MySQL) which is gonna include the artist name and the playtime etc. But other than that, i have just no idea.

    So i was wondering if you guys maybe could help me get started with this, maybe give me a hint? I was putting it in this part of the forum because i suppose, most of the code will be PhP code.

    Well i really hope i can get some help out there. This is a school project and will be done in about 3 weeks, so i just want help to get started with this part. I know i'm not very good at webprogramming yet but i love doing it and perhaps i will become good one day. I would really appreciate some help. :)

  • #2
    Master Coder
    Join Date
    Jun 2003
    Location
    Cottage Grove, Minnesota
    Posts
    9,540
    Thanks
    8
    Thanked 1,093 Times in 1,084 Posts
    If your music is MP3 ... you can use a free Flash MP3 player embedded in your website.
    There are several to choose from. What you do is store the actual MP3 files in a directory,
    and then store the MP3 filenames in the database.

    Here is a link to a free MP3 Flash Player:
    http://www.catpin.com/streaming.php
    Test it out and download the zipped .swf (flash) file.

    Here is an example of how to play an MP3 file called "your_song.mp3"
    using the "streaming.swf" file that you unzipped. You need to enter the
    path and filename of your own MP3 files (of course).

    PHP Code:


    <object type="application/x-shockwave-flash" data="player.swf" width="290" height="24" id="audioplayer1"><param name="movie" value="player.swf" /><param name="FlashVars" value="playerID=1&amp;bg=0xf8f8f8&amp;leftbg=0x8297cc&amp;lefticon=0xffffff&amp;rightbg=0xe09e7b&amp;rightbghover=0xb35884&amp;righticon=0xffffff&amp;righticonhover=0xffffff&amp;text=0x666666&amp;slider=0x666666&amp;track=0xFFFFFF&amp;border=0x666666&amp;loader=0x9FFFB8&amp;soundFile=your_song.mp3" /><param name="quality" value="high" /><param name="menu" value="true" /><param name="bgcolor" value="#FFFFFF" /></object

    .
    Last edited by mlseim; 01-05-2012 at 12:48 AM.

  • Users who have thanked mlseim for this post:

    webjoker (01-05-2012)

  • #3
    New Coder
    Join Date
    Jan 2012
    Location
    Sweden
    Posts
    32
    Thanks
    7
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by mlseim View Post
    If your music is MP3 ... you can use a free Flash MP3 player embedded in your website.
    There are several to choose from. What you do is store the actual MP3 files in a directory,
    and then store the MP3 filenames in the database.

    Here is a link to a free MP3 Flash Player:
    http://www.catpin.com/streaming.php
    Test it out and download the zipped .swf (flash) file.

    Here is an example of how to play an MP3 file called "your_song.mp3"
    using the "streaming.swf" file that you unzipped. You need to enter the
    path and filename of your own MP3 files (of course).

    PHP Code:


    <object type="application/x-shockwave-flash" data="player.swf" width="290" height="24" id="audioplayer1"><param name="movie" value="player.swf" /><param name="FlashVars" value="playerID=1&amp;bg=0xf8f8f8&amp;leftbg=0x8297cc&amp;lefticon=0xffffff&amp;rightbg=0xe09e7b&amp;rightbghover=0xb35884&amp;righticon=0xffffff&amp;righticonhover=0xffffff&amp;text=0x666666&amp;slider=0x666666&amp;track=0xFFFFFF&amp;border=0x666666&amp;loader=0x9FFFB8&amp;soundFile=your_song.mp3" /><param name="quality" value="high" /><param name="menu" value="true" /><param name="bgcolor" value="#FFFFFF" /></object

    .
    Oh, thank you very much! I will take a look at your code you just gave me and try it out. It means really much to me! Oh, and have a nice day :)

    Regards: Webjoker

  • #4
    New Coder
    Join Date
    Jan 2012
    Location
    Sweden
    Posts
    32
    Thanks
    7
    Thanked 0 Times in 0 Posts
    Oh i have another question! Do it work fine with Windows media player aswell or do i have to download a flash player?

  • #5
    Master Coder
    Join Date
    Jun 2003
    Location
    Cottage Grove, Minnesota
    Posts
    9,540
    Thanks
    8
    Thanked 1,093 Times in 1,084 Posts
    I thought you wanted to have them play it on the website.

    If you want them to be able to download it, then you can do that too.
    They would be downloading an MP3 file, just like any other MP3.
    Your music is in the form of MP3?

    It's all the same. You put your MP3 files in a directory, and the filenames in the database.
    Instead of the embedded Flash Player, you have a link to download each song.

    That's a pretty good starting point for you ...
    You said school project ... is it homework?

  • Users who have thanked mlseim for this post:

    webjoker (01-06-2012)

  • #6
    New Coder
    Join Date
    Jan 2012
    Location
    Sweden
    Posts
    32
    Thanks
    7
    Thanked 0 Times in 0 Posts
    Should say more or less a project, been having this for several months now, or, you could also see this as a homework therefore i don't work with this website at school. And at the same time i'm going to make this website for my dad, he's in need of one. I'm going to kill two birds with one stone.

  • #7
    New Coder
    Join Date
    Jan 2012
    Location
    Sweden
    Posts
    32
    Thanks
    7
    Thanked 0 Times in 0 Posts
    Oh forgot to thank you, i made it. Now, it is possible to listen too music at my webpage. Really appreciate your help!

  • #8
    Master Coder
    Join Date
    Jun 2003
    Location
    Cottage Grove, Minnesota
    Posts
    9,540
    Thanks
    8
    Thanked 1,093 Times in 1,084 Posts
    And there are other free Flash Players.
    Some even have playlists. You can Google: Free MP3 Flash Players


    .

  • Users who have thanked mlseim for this post:

    webjoker (01-07-2012)


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •