PHP streaming for mp3

Discussion in 'PHP' started by testblanc, Sep 13, 2007.

  1. #1
    Hi,

    I am looking for a script that can do a php streaming for mp3
    I search for information, script, and program.
    My goal is to stream some mp3 without using a playlist

    Thanks for your help
     
    testblanc, Sep 13, 2007 IP
  2. hip_hop_x

    hip_hop_x Active Member

    Messages:
    522
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    90
    #2
    you'll need ming(flash) module on server. || more info on php.net
    <?php
    $mp = new SWFMovie();
    $mp->setRate(12.0);
    $mp->streamMp3(file_get_contents("music/my_mp3.mp3"));
    $mp->setFrames(142);
    header('Content-type: application/x-shockwave-flash');
    $mp->output();
    ?> 
    Code (markup):
     
    hip_hop_x, Sep 13, 2007 IP
  3. testblanc

    testblanc Active Member

    Messages:
    121
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    73
    #3
    thanks!
    Please, can you just explain me the value in bold?
    thanks!


    <?php
    $mp = new SWFMovie();
    $mp->setRate(12.0);
    $mp->streamMp3(file_get_contents("music/my_mp3.mp3"));
    $mp->setFrames(142);
    header('Content-type: application/x-shockwave-flash');
    $mp->output();
    ?>
     
    testblanc, Sep 13, 2007 IP