Hello, I would like your help to solve the following problem, I have a code that is used to make mediafire files, open in jwplayer. However I do require that%% of mediafire be encoded. I tried to use url
and base64_encode
but could not make it work on Wordpress.
I would like your help to implement the code below so that the original url is inside the php code and the coded url works in the player.
<?php
$mediafireVideo = explode('/', $valorFinalB);
// dados da media
$urlVideo = $mediafireVideo[4];
$arquivoVideo = file_get_contents('http://www.mediafire.com/file/' . $urlVideo. '/');
$start = strpos($arquivoVideo, 'http://download');
$end = strpos($arquivoVideo, "'",$start);
//echo "$start \n $end \n" ;
$arquivoVideo = substr($arquivoVideo, $start,$end - $start);
//echo $arquivoVideo;
?>
<div id="option-1<?php echo $numeradoB; ?>" class="play-box-iframe fixidtab">
<script src="https://content.jwplatform.com/libraries/fNkNmTXG.js"></script><divid="player-1<?php echo $numeradoB; ?>"></div>
<script type="text/javascript">// <![CDATA[
jwplayer('player-1<?php echo $numeradoB; ?>').setup({
title: "<?php the_title(); ?>",
image: "<?php echo esc_url($thumb_id); ?>",
file: "<?php echo $arquivoVideo; ?>",
mute: "false",
autostart: "false",
repeat: "false",
height: "100%",
width: "100%",
stretching: "uniform",
primary: "html5",
flashplayer:"//cdn.jsdelivr.net/jwplayer/5.10/player.swf",
preload:"metadata",
logo: {
file:'<?php echo $jwlogo2; ?>',
hide:"false",
margin:"15",
position:'<?php echo $jwlogoposit2 ?>',
}
});
// ]]></script>