Insert php code in embedded layout

I´d like to include this php code in embedded layout. I put it in the html code option of embedding layout. But It doesnt working.

Is possible I use it with embedded layout?

<//html>
<//body>
<?php
// Include the library
include('simple_html_dom.php');

// Retrieve the DOM from a given URL
$html = file_get_html('http://www.climatempo.com.br/tempo-no-seu-site/videos/selo/sul/420x315/');

$iframes = $html->find('iframe');
$v = $iframes[0];
$s = $v->src."?autoplay=1";
header ("Location: $s");
?>
<///body>
<///html>

Embedded modules run client side i’m afraid and therefore don’t have access to PHP.

You’d need to author your own Xibo module to do that. http://xibo.org.uk/manual/en/advanced_modules.html

Hi,
I am using xibo cloud trial 14 days. I am testing XIBO. Can you enable it to me?

Luiz

I am afraid we do not allow custom modules or module development on our platform - it would be a security risk. All modules need to be completed and analysed by our security team before we can accept them.

You will need to have an offline development environment to make and test your module, and once it is completed you can submit it to us for inclusion in the project.

Looking at what you are trying to do - I am not sure you are approaching it in the correct way. I would look at using Xibo embedded module and javascript to add ?autoplay=1 to the end of that iframe.

OK, thank you.

I just did with javascript and embedded module.

Luiz

Hello,

can i use a PHP code in embedded HTML now with 1.8rc02 on my own server? Or how i use a php code?

The only way to write your own PHP is to develop your own module - see here: http://xibo.org.uk/manual-tempel/en/advanced_modules.html

1 Like
`<body style="padding:0!important;margin:0!important" >
<iframe width="538" height="383" src="https://www.youtube.com/embed/9fCBwrW8rWA?rel=0&autoplay=1" frameborder="0" allowfullscreen>`

tenta esse, aqui voce edita o tamanho ( width=“538” height=“383” ) remove isso e tira o play auto (?rel=0&autoplay=1)