使用div作为iframe的替代方案

I have an iframe on my site that shows the full contents of an external site. I want to get rid of the iframe but keep the same functionality. I was thinking of using a div with overflow=auto. Problem is, when I attempt to include an external site using php, such as include 'http://www.site.com'; or echo file_get_contents("http://www.site.com");, the site shows up but it takes over formatting, the site's name appears in the titlebar, etc. How might I replace the iframe functionality?

How might I replace the iframe functionality?

This is not easily possible. You run into the problems you just described and to solve those is a real hard job. I don't know of an existing component that does this.

Instead stick to the iframe. What's so bad about it?

If you are getting rid of the iframe because of its default ugly border then you can just make the iframe look seamless using the 'seamless' attribute of iframe

http://www.w3schools.com/html5/att_iframe_seamless.asp