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
iframe alternative
Moderator: General Moderators
- mrvijayakumar
- Forum Commoner
- Posts: 58
- Joined: Tue Aug 18, 2009 12:39 am
- Location: Chennai city, India
- Contact:
Re: iframe alternative
Try using, <div> tag for displaying..
<style type="text/css">
<!--
.iframe {
overflow:scroll;
}
-->
</style>
<div class="iframe"></div>
<style type="text/css">
<!--
.iframe {
overflow:scroll;
}
-->
</style>
<div class="iframe"></div>
Re: iframe alternative
no <div> doesnt' help.I used the code in this way
I am stuck . Please help
Mehnaz
Code: Select all
<div style="overflow:scroll;">
<iframe src=<?php print $selectedUrl; ?> width=100% height=100% frameborder="0"> </iframe>
</div>Mehnaz
- mrvijayakumar
- Forum Commoner
- Posts: 58
- Joined: Tue Aug 18, 2009 12:39 am
- Location: Chennai city, India
- Contact:
Re: iframe alternative
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.
I integrated Div with curl, which u expecting. Please download attachment and try using. You may get exact result.
- Attachments
-
- curl.zip
- (1.14 KiB) Downloaded 65 times
Re: iframe alternative
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.
Real programmers don't comment their code. If it was hard to write, it should be hard to understand.
Re: iframe alternative
yes the site is checking for iframe and I think I have to use a pop window instead
- John Cartwright
- Site Admin
- Posts: 11470
- Joined: Tue Dec 23, 2003 2:10 am
- Location: Toronto
- Contact:
Re: iframe alternative
If they do not want their content hot-linked, then I don't think you should be circumventing their wishes. 