Page 1 of 1
iframe alternative
Posted: Tue Dec 01, 2009 5:18 am
by Mehnaz
Hi,
I am using <iframe> to display external web pages. The iframe src is dynamically selected using a php script. For some urls it is working fine but one site(
http://medlineplus.go) is restricting site framing. If i use file_get_contents() instead, the output loose all style, images and link information. how could I do this .
Please help
Mehnaz
Re: iframe alternative
Posted: Tue Dec 01, 2009 5:31 am
by mrvijayakumar
Try using, <div> tag for displaying..
<style type="text/css">
<!--
.iframe {
overflow:scroll;
}
-->
</style>
<div class="iframe"></div>
Re: iframe alternative
Posted: Tue Dec 01, 2009 5:55 am
by Mehnaz
no <div> doesnt' help.I used the code in this way
Code: Select all
<div style="overflow:scroll;">
<iframe src=<?php print $selectedUrl; ?> width=100% height=100% frameborder="0"> </iframe>
</div>
I am stuck . Please help
Mehnaz
Re: iframe alternative
Posted: Tue Dec 01, 2009 6:12 am
by mrvijayakumar
Please try using CURL function, you may get result.
I integrated Div with curl, which u expecting. Please download attachment and try using. You may get exact result.
Re: iframe alternative
Posted: Tue Dec 01, 2009 9:57 am
by pickle
What do you mean by "restricting site framing"? Does the page not work in an iframe because the site checks if it's in the top frame? If that's the case, there's really nothing you can do to get it to show up in the frame. You can have it open in a new window perhaps.
Re: iframe alternative
Posted: Tue Dec 01, 2009 5:55 pm
by Mehnaz
yes the site is checking for iframe and I think I have to use a pop window instead
Re: iframe alternative
Posted: Tue Dec 01, 2009 6:04 pm
by John Cartwright
If they do not want their content hot-linked, then I don't think you should be circumventing their wishes.
