Hi, For configuring auth_backend & inserting ads on PHP needed to create an external web server, for example, nginx # install php and nginx apt update apt install nginx php7.2-fpm # type next command: nano /etc/nginx/sites-available/auth_backend # Ctrl+O - for save file # Ctrl+X - close editor # copy in here follow code: server { listen 80; server_name ; root /var/www/auth_backend/; index index.php; location ~ \.php$ { try_files $uri =404; include /etc/nginx/fastcgi.conf; fastcgi_pass unix:/run/php/php7.2-fpm.sock; } } # Create a directory for the site and put here auth_backend script mkdir /var/www/auth_backend nano /var/www/auth_backend/auth_backend.php 3) { $parts = explode(":", $line); $tokens[$parts[1]] = $parts[0]; } } if($tokens[$token]) { header("HTTP/1.0 200 OK"); header("X-UserId: ".$tokens[$token]."\r\n"); # header("X-Max-Sessions: 5\r\n"); // Turn this on to protect from multiscreen } else { header('HTTP/1.0 403 Forbidden'); } # code to insert ads header('Content-type: application/json'); $user_ads = [ "preroll" => "vod/bunny.mp4", "midroll_interval" => 180, "midroll" => ["vod/bunny.mp4", "vod/bunny.mp4"] ]; echo json_encode(array("ad_inject" => $user_ads)); ?> # Ctrl+O - for save file # Ctrl+X - close editor # File with tokens and users: nano /var/www/auth_backend/auth.txt user1:token1 user2:token2 user3:token3 # Ctrl+O - for save file # Ctrl+X - close editor # For apply changes restart nginx service nginx restart # For test perform follow command: curl -v http:///auth_backend.php * Trying 127.0.1.1... * TCP_NODELAY set * Connected to an1.e (127.0.1.1) port 8080 (#0) > GET /auth_backend.php HTTP/1.1 > Host: > User-Agent: curl/7.58.0 > Accept: */* > < HTTP/1.1 403 Forbidden < Server: nginx/1.14.0 (Ubuntu) < Date: Sat, 18 May 2019 07:51:33 GMT < Content-Type: text/html; charset=UTF-8 < Transfer-Encoding: chunked < Connection: keep-alive # Configure the Flussonic, nano /etc/flussonic/flussonic.conf # type here following code: auth_backend main { backend http:///auth_backend.php; } stream ads_insert { url fake://fake; auth auth://main; } # apply Flussonic configuration service flussonic reload # For test open url http://flussonic-ip/ads_insert/embed.html?token=token1