<?php //code for your back-end , example_token.php //$nr = '192.168.1.2'; // nice restreamer address //- check ip //$ip = $_SERVER['REMOTE_ADDR'];//- check ip //if (empty($_GET['token']) || $nr != $ip){ //- check ip if (empty($_GET['token'])){ header($_SERVER["SERVER_PROTOCOL"]." 403 Forbidden"); exit; } $uid = testToken($_GET['token']); if (!$uid){ header($_SERVER["SERVER_PROTOCOL"]." 403 Forbidden"); }else{ header("X-Unique: true"); header("X-UserId: ".$uid); header($_SERVER["SERVER_PROTOCOL"]." 200 OK"); } function testToken($tkn) { $token = '12345678'; if($tkn == $token){ return 'User id'; }else{ return false; }; } ?>