<mount> <mount-name>/demostream</mount-name> <max-listeners>100</max-listeners> <fallback-mount>/nonstop</fallback-mount> <fallback-override>1</fallback-override> <charset>UTF8</charset> <hidden>0</hidden> <authentication type="url"> <option name="stream_auth" value="http://localhost/source_auth.php"/> <option name="auth_header" value="icecast-auth-user: OK"/> <option name="user" value="source"/> </authentication> </mount>
$port=$_POST['port']; $password_req=$_POST['pass']; $allowed_passwords=array(); $allowed_passwords[]='pass1'; $allowed_passwords[]='pass2'; $allowed_passwords[]='pass3'; if(in_array($password_req,$allowed_passwords)) { header('icecast-auth-user: OK'); header('icecast-auth-message: Auth is succesful'); } else { header('icecast-auth-message: Auth is failed'); }