PHP code example of gbrousse / icecast-auth
1. Go to this page and download the library: Download gbrousse/icecast-auth library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
gbrousse / icecast-auth example snippets
use IcecastAuth\IcecastAuth;
$IceAuth = new IcecastAuth();
// Setup
$IceAuth->setAuthCallback('function1'); // REQUIRED : Set the function call for the authentication
// Execute
$IceAuth->execute();
<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>