SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Enthusiast
    Join Date
    Jun 2007
    Posts
    45
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    newbie - play a mp3 30 seconds.

    I am newbie, I am aware that this is not for beginners, but please help, i don't have the slightest idea on haw this should be done, and i will appreciate very much some help!

    What are the methods that i can play a mp3 30 seconds on the site ?; limit the time that a audio file can be played. ( embed flash player ?)
    I found this method, but i can't adapted


    Code PHP:
    <?php
    $filename = "NAMEOFTHEFile.mp3";
     
    $myFile = $_GET['path'];
     
    $mm_type="audio/mpeg";
     
    header("Cache-Control: no-store");
    header("Pragma: no-cache"); 
    header("Content-Type: " . $mm_type);
    header("Content-Length: " .(string)(filesize($myFile)) );
    header("Content-Transfer-Encoding: binary\n");
     
    readfile($myFile);
     
    ?>

    Thank you for you time!

  2. #2
    SitePoint Wizard stereofrog's Avatar
    Join Date
    Apr 2004
    Location
    germany
    Posts
    4,324
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Embedding flash player is your best bet. Check out soundmanager

    http://www.schillmania.com/projects/soundmanager2/

  3. #3
    SitePoint Enthusiast
    Join Date
    Jun 2007
    Posts
    45
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks !!!!
    thank you very much !


Bookmarks

Posting Permissions

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