PHP library used to authenticate listeners via Icecast authentication (URL) (http://icecast.org/docs/icecast-2.4.1/auth.html). This library execute your own functions or methods on Icesast server events.
Install the latest version with
$ composer require gbrousse/icecast-auth
<?php
use IcecastAuth\IcecastAuth;
$IceAuth = new IcecastAuth();
// Setup
$IceAuth->setAuthCallback('function1'); // REQUIRED : Set the function call for the authentication
// Execute
$IceAuth->execute();
Setup callback function will receive as argument an array containing :
- server : domain of the Icecast server
- port : the port use to call the stream
- client : an unique id set by Icecast for the listener
- mountpoint : the mount called by listener
- ip : ip of the listener
- all GET parameters in the stream url called by the listener
<mount>
<mount-name>/example.ogg</mount-name>
<authentication type="url">
<option name="mount_add" value="[URL OF THE SCRIPT YOU CREATE ABOVE]"/>
<option name="auth_header" value="icecast-auth-user: 1"/>
<option name="timelimit_header" value="icecast-auth-timelimit:"/>
</authentication>
</mount>
- IcecastAuth works with PHP 5.3 or above.
Bugs and feature request are tracked on GitHub
Gregory Brousse - pro@gregory-brousse.fr - http://gregory-brousse.fr
IcecastAuth is licensed under the LGPL-3.0 License - see the LICENSE
file for details