I would like to know if it is possible , and if it is how to manage this.
I try to explain what i would like to create.
I have a livestream player called Clappr player , it runs with authentication and it calls an file from root with in this file the server ip.
After specific time i would like to change the server ip to other server ip’s by calling another file, where other server ip’s are stored.
Here is my code example;<?php include_once($_SERVER["DOCUMENT_ROOT"] . "/nimble.php"); include_once($_SERVER["DOCUMENT_ROOT"] . "/name.php"); $channel = "1"; $url = $servers[array_rand($servers)]; $name = $servers1[array_rand($servers1)]; $hls = "http://$url/live/$name$channel/playlist.m3u8"; ?>
The above code asking from the nimble.php the server ip, i wish to get this file changed after several minutes to another file called cloud.php which contains several ip’s
The nimble.php contains this;<?php $servers = array("my.stream.server.ip"); ?>
The cloud.php contains this;<?php $servers = array("ser.ver.ip.1","ser.ver.ip.2","ser.ver.ip.3","ser.ver.ip.4","ser.ver.ip.5","ser.ver.ip.6","ser.ver.ip.7","ser.ver.ip.8","ser.ver.ip.9","ser.ver.ip.10"); ?>
The player itself running this code
var source = ‘<?php echo $hls;?>?wmsAuthSign=<?php echo $base64urlsignature;?>’;
So, i dont know if this can be done with php to change the nimble.php after 5 minutes to cloud.php.
I really hope this can be done and would like to get some help, because for now i am stuck and can’t find my answer on the net.
With Kind regards!!