Get the value of the variable url for iframe [closed]

-1

I'd like help see the example:

http://www.site.com/pagina.php?url=http://www.valordavariavel.com

In my php: page.php I have the iframe:

<iframe src="" width="100%" height="100%" scrolling="no" frameborder="0"  allowfullscreen="true"></iframe>

Now how do I get the value of the url variable for the iframe src=""

The result I'd like to get is:

<iframe src="http://www.valordavariavel.com"width="100%" height="100%" scrolling="no" frameborder="0"  allowfullscreen="true"></iframe>

I've tried:

<iframe src="<?php echo $url; ?>" width="100%" height="100%" scrolling="no" frameborder="0"  allowfullscreen="true"></iframe>

But it did not work, thanks for the attention right now!

    
asked by anonymous 07.10.2016 / 02:10

1 answer

3

Just use the GET method:

$url = $_GET['url'];

And no iframe put:

<iframe src="<?php echo $url; ?>" width="100%" height="100%" scrolling="no" frameborder="0"  allowfullscreen="true"></iframe>
    
07.10.2016 / 04:58