PHP - ICECAST - PROGRAMER
Project ID: 1232856126
Project Details
  • Status:
    Closed (Cancelled)
  • Posted:
    1/24/2009 at 23:02 EST
  • Cancelled:
    2/16/2009 at 0:58 EST
  • Project Creator:
  • Budget:
    N/A
  • Description:
    I'm looking for a way that I can authenticate any user that is logging in the system to broadcast on mount with the follow script that was described in this email I'd received by Karl Heyes.



    There's 2 parts, the icecast part and then the script which determines if a connecting DJ should be allowed to continue.

    The sample files show how you can specify a url authentication block in a mount section. That part is simple and easy to add.

    The script is the thing to need to do. It runs from a web server and is probably in something like php. It takes the details sent via POST and makes a decision on whether to allow them or not. To tell icecast to allow that DJ, all the script needs to do is return a specific header

    Default is icecast-auth-user:1

    anything else means the DJ is rejected.

    so a script like

    <?
    header ('icecast-auth-user: 1');
    ?>

    will allow any DJ connecting on a mountpoint to authenticate, but you want to limit when and on which mountpoint they connect on. So just expand on that

    --------------some more details as to he's talking about-------------------------------

    <!-- Only define a <mount> section if you want to use advanced options,
    like alternative usernames or passwords
    <mount>
    <mount-name>/example-complex.ogg</mount-name>

    <username>othersource</username>
    <password>hackmemore</password>

    <max-listeners>1</max-listeners>
    <dump-file>/tmp/dump-example1.ogg</dump-file>
    <burst-size>65536</burst-size>
    <fallback-mount>/example2.ogg</fallback-mount>
    <fallback-override>1</fallback-override>
    <fallback-when-full>1</fallback-when-full>
    <intro>/path/to/stream-intro.ogg</intro>
    <max-listener-duration>3600</max-listener-duration>
    <hidden>1</hidden>
    <authentication type="htpasswd">
    <option name="filename" value="myauth"/>
    <option name="allow_duplicate_users" value="0"/>
    </authentication>
    <on-connect>/home/icecast/bin/stream-start</on-connect>
    <on-disconnect>/home/icecast/bin/stream-stop</on-disconnect>
    </mount>
    -->
    <!-- other auth possibilities include running a command
    to do the auth, mount, user and pass are passed via
    stdin to the program
    <mount>
    ....
    <authentication type="command">
    <option name="filename" value="auth_verify"/>
    </authentication>

    or

    for url auth, the add url needs to return a "icecast-auth-user: 1" http
    header for a user to authenicate. Both urls are sent params via POST,
    add is sent id, mount, user, pass, ip, useragent
    remove is passed id, mount, user, pass, duration

    <authentication type="url">

    state username/password if url requires it

    <option name="username" value="admin"/>
    <option name="password" value="hackme"/>
    <option name="add" value="http://myauthserver.com/scripts/add_listener.php"/>
    <option name="remove" value="http://myauthserver.com/scripts/del_listener.php"/>
    </authentication>
    </mount -->


    --------------------------------------------------------------------------------------------------------------



    Please before you reply to this post to let know you read the project details and understand it type 83sjh3-29 at the top of your message.
  • Tags:
Project Bids



(No bids have been placed yet. Click here to place the first bid on this Project.)