Discover Habbo's history
Treat yourself with a Secret Santa gift.... of a random Wiki page for you to start exploring Habbo's history!
Happy holidays!
Celebrate with us at Habbox on the hotel, on our Forum and right here!
Join Habbox!
One of us! One of us! Click here to see the roles you could take as part of the Habbox community!


Results 1 to 6 of 6
  1. #1
    Join Date
    May 2006
    Location
    Hull
    Posts
    7,701
    Tokens
    2,430
    Habbo
    Moh

    Latest Awards:

    Default Play mp3 file using php

    Whats the easiest way to have a php file which loads a mp3 file so you don't have to display the url?

    e.i:

    songname - artist.mp3

    would look like:

    mp3.php?id=1

    Thanks in advance.

  2. #2
    Join Date
    Oct 2006
    Location
    Peterborough, UK
    Posts
    3,855
    Tokens
    216

    Latest Awards:

    Default

    PHP Code:
    header("Content-Type: Audio/MP3");
    $lol file_get_contents("mp3file");
    echo(
    $lol); 
    not sure what the actual mime type for an mp3 file is though


    visit my internet web site on the internet
    http://dong.engineer/
    it is just videos by bill wurtz videos you have been warned

  3. #3
    Join Date
    Aug 2006
    Location
    Manchester, UK
    Posts
    2,016
    Tokens
    141
    Habbo
    florx

    Latest Awards:

    Default

    MP3 — Mime Type: audio/mpeg

    According to http://linuxreviews.org/dictionary/MP3/

    audio/x-mpeg-3


    audio/mpeg3

  4. #4
    Join Date
    May 2006
    Location
    Hull
    Posts
    7,701
    Tokens
    2,430
    Habbo
    Moh

    Latest Awards:

    Default

    Quote Originally Posted by JH View Post
    MP3 — Mime Type: audio/mpeg

    According to http://linuxreviews.org/dictionary/MP3/

    audio/x-mpeg-3


    audio/mpeg3
    I tried that first, but it only plays the first 3 seconds :S

  5. #5
    Join Date
    Dec 2006
    Location
    Swindon
    Posts
    3,299
    Tokens
    215
    Habbo
    dunko

    Latest Awards:

    Default

    Ahh, this is a good idea, because if you make a php file that reads out a music file, and if your at school where accessing MP3's are blocked, go to the PHP file and it wont be blocked

  6. #6
    Join Date
    Oct 2006
    Location
    Peterborough, UK
    Posts
    3,855
    Tokens
    216

    Latest Awards:

    Default

    Quote Originally Posted by Jack120 View Post
    I tried that first, but it only plays the first 3 seconds :S
    doesn't support buffering


    visit my internet web site on the internet
    http://dong.engineer/
    it is just videos by bill wurtz videos you have been warned

Posting Permissions

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