Embed an External Page Without an Iframe?

by 6 replies
12
i need embed external site without iframe i don"t find any code work for me ..if one genies here ans my questions

i appreciate it..
#website design #embed #external #iframe #page
  • This seems to work in Firefox:
    Code:
    <!doctype html>
    <html lang="en">
    <head>
    <meta charset="utf-8" />
    <title></title>
    </head>
    <body>
    <object data=http://www.othersite.com width="820" height="450">
    <embed src=http://www.othersite.com width="820" height="450">
    </embed> Error: Embedded data could not be displayed. </object>
    </body>
    </html>
    • [1] reply
    • Another option (one which will work in all browsers) is to grab the source code of the external page and echo it out using PHP...

      PHP Code:
      <?php
      echo file_get_contents("http://www.ExternalPage.com");
      ?>
      ^ A couple potential drawbacks to that method though...

      1) If the external site uses relative links in its source code, those links won't work (although there is a workaround to that if it's worth it to you, by using str_replace to make all the links absolute).

      2) Echoing 'file_get_contents' from an external URL presents a security risk, because if the owner of the external site ever puts malicious code on the page that you're echoing, that code will be injected directly into your page. The chances of that happening are slim, but just be aware that it is possible.
    • [DELETED]
    • [DELETED]
    • [DELETED]
    • [DELETED]
    • [DELETED]
    • [DELETED]
  • sir thing is when i try to load flickr dot com it not loading that what i trying do
  • Banned
    If the other webpage doesn't contain any form or text, for example you can use the CURL method to pickup the exact content and after then showing on your page. YOu can do it without using an iframe.

    But, if the page what you want to embed contains for example a form it will not work correctly , because the form handling is on that site.
    • [1] reply
    • can i have Example so that i can understand it better ...
      • [1] reply

Next Topics on Trending Feed