
php inside soucer file
I have this simple php code that works fine:
<?php
srand((float) microtime() * 1971);
$input = array("https://www.youtube.com/watch?v=w2G5oim2mYM", "https://www.youtube.com/watch?v=TrR5RGSNrxo", "https://www.youtube.com/watch?v=9wKCc0hcieU", "https://www.youtube.com/watch?v=4_C4BDM2PA0");
$rand_keys = array_rand($input, 2);
$mixupa = $input[$rand_keys[0]] . "\n";
echo $mixupa
?>
It just random and get one of the 3 youtube links and attrib to $mixupa
this part works fine
the problem is to make $mixupa run in JWPlayer source file
I'm trying this
<script type="text/javascript">jwplayer("PM").setup({sources: [{
file:"'<?php $mixupa ?>'",label:"LEG 360p","type":"mp4"}],logo: {
file: "http://www.apertaplay.com/assets/uploads/images/Fnl76oLANN.png",link: "http://www.apertaplay.com", hide: "true"},autostart: "false",width: "100%",height: "85%",
tracks: [{file: "/Filmes/novojw.vtt",label: "PT-BR",kind: "captions", default: "true",}],
captions: {color: "#FFFF00",fontSize: 18,edgeStyle: "uniform",backgroundOpacity: 0,},aboutlink:"http://www.apertaplay.com",abouttext:"ApertaPlay"});
</script>
already tried "<?php $mixupa ?>" , '<?php $mixupa ?>' , "'<?php echo $mixupa; ?>'" etc
I wondering if I must have some .js script to allow jwplayer to run php code?