Author Topic: iFrame workaround  (Read 1648 times)

0 Members and 1 Guest are viewing this topic.

Offline DeXtreme

  • Peasant
  • *
  • Posts: 95
  • Cookies: 8
  • I was there and you never knew.
    • View Profile
    • My Designs
iFrame workaround
« on: April 26, 2013, 06:39:13 pm »
I've been trying to embed external webpages in my webpage but the iFrame ends up blank. Tried with the object tag and embed tag but had the same result.I did some research and found out that some pages send "Deny" response when you try to iFrame them. So i ask you gentlemen if there is a workaround for this problem..

Offline vezzy

  • Royal Highness
  • ****
  • Posts: 771
  • Cookies: 172
    • View Profile
Re: iFrame workaround
« Reply #1 on: April 26, 2013, 11:22:50 pm »
Try a modal window library, such as Lightbox. Of course this will end up overlaying the web page, but you can modify it to be less of an obtrusion.
Quote from: Dippy hippy
Just brushing though. I will be semi active mainly came to find a HQ botnet, like THOR or just any p2p botnet

Offline DeXtreme

  • Peasant
  • *
  • Posts: 95
  • Cookies: 8
  • I was there and you never knew.
    • View Profile
    • My Designs
Re: iFrame workaround
« Reply #2 on: April 27, 2013, 02:40:09 am »
Thanks a lot.i'll be sure to read about it but is this the only alternative?

Offline Uriah

  • Sir
  • ***
  • Posts: 454
  • Cookies: 42
  • άξονας
    • View Profile
Re: iFrame workaround
« Reply #3 on: April 27, 2013, 07:59:44 am »
I have little knowledge on this, but check out php file_read_contents and readfile().

Offline DeXtreme

  • Peasant
  • *
  • Posts: 95
  • Cookies: 8
  • I was there and you never knew.
    • View Profile
    • My Designs
Re: iFrame workaround
« Reply #4 on: April 27, 2013, 02:48:50 pm »
Thanks..will do

Offline Fur

  • Knight
  • **
  • Posts: 216
  • Cookies: 34
    • View Profile
Re: iFrame workaround
« Reply #5 on: April 27, 2013, 03:22:45 pm »
Presuming you're using PHP, do something like this in your script:
Code: (PHP) [Select]

if(!empty($_GET['get_page'])) {
   if(!filter_var($_GET['get_page'], FILTER_VALIDATE_URL)) {
      // Not a URL.
      exit;
   }
    $page = file_get_contents($_GET['get_page']);
    if($page === false) {
        die('Page request filed.');
    }


    echo file_get_contents($_GET['get_page']);
}
Make sure you have set "allow_url_fopen" to 1 in your PHP config.


Then just call "whatever_page_you_put_the_code_in.php?get_page=http://blah.com/blah.php" instead of the website.
Just note that some websites forbid visitors who have no UA from accessing the site, and this can be easily abused as it is pretty much a proxy.


Might not work, but it's worth a try.
« Last Edit: April 27, 2013, 03:24:52 pm by Fur »

Offline DeXtreme

  • Peasant
  • *
  • Posts: 95
  • Cookies: 8
  • I was there and you never knew.
    • View Profile
    • My Designs
Re: iFrame workaround
« Reply #6 on: April 27, 2013, 04:22:45 pm »
Thank you very much but i'm not really conversant with PHP. Do you happen to know a sloution in javascript?

Offline Fur

  • Knight
  • **
  • Posts: 216
  • Cookies: 34
    • View Profile
Re: iFrame workaround
« Reply #7 on: April 27, 2013, 06:28:59 pm »
Thank you very much but i'm not really conversant with PHP. Do you happen to know a sloution in javascript?
Not that I know of.
http://en.wikipedia.org/wiki/Same_origin_policy


Alternatively, you could use Java or Flash to display the page.