Dynamic iframe pages

Permalink
I've tried making a page that can load other web pages in an iframe, dynamically through the URL. Sounds simple enough using $_REQUEST['url'] in an iframe in a custom external form, but it isn't working. Here's what I've done...

The external form file:

<?php 
defined('C5_EXECUTE') or die(_("Access Denied."));
if (isset($response)) { ?>
   <?php echo $response?>
<?php  } ?>
<iframe src="<?php $_REQUEST['url'] ?>" scrolling="auto" height="1000" width="100%" frameborder=0 padding=5></iframe>


The URL passed to that page:

http://kzsc.org/index.php?cID=76&url=anything...

But yet the page only shows this in the code:

<iframe src="" scrolling="auto" height="1000" width="100%" frameborder=0 padding=5></iframe>

Any thoughts on how to make this actually work?

Thanks!

razorfrog
 
razorfrog replied on at Permalink Reply
razorfrog
Got it working. Topic closed.
Remo replied on at Permalink Reply
Remo
Ta2Ta2 replied on at Permalink Reply
Hi razorfrog,

Would you please tell me how did you manage to make it happen?

I'd love to make it works for me as well...excuse my limited php knowledge...
razorfrog replied on at Permalink Reply
razorfrog
I put this in an external form block:

<?php
defined('C5_EXECUTE') or die(_("Access Denied."));
if (isset($response)) { ?>
<?php echo $response?>
<?php } ?>
<iframe src="<?php
echo $_REQUEST['url'];
?>" scrolling="auto" height="1000" width="100%" frameborder=0 padding=5></iframe>
Ta2Ta2 replied on at Permalink Reply
Thanks razorfrog for the quick response...

I used the code you've provided and as soon as I used it, I got the below error:

Fatal error: Call to a member function runTask() on a non-object in /home/content/85/6270085/html/c5/concrete/blocks/external_form/controller.php on line 67

And I'm not able to view the page where I added this code anymore..
razorfrog replied on at Permalink Reply
razorfrog
You might be better off installing a PHP code block like this:

http://www.concrete5.org/community/forums/block_requests/simple_php...