Jump to content

displaying a website on another website


divinedesigns1

Recommended Posts

You can load the HTML of another page with PHP, but it's likely that a whole lot of links and stylesheets will be broken. Iframe is pretty much the only way.

ok, though there was another way guess iframe it is, thanks

Link to comment
Share on other sites

You can use DOM though to get the links of stylesheet, JS file and other links. and make separate request to those web resource.What you are asking is like proxy. Absolute links will work any way. You need to take care of relative links.

Edited by birbal
Link to comment
Share on other sites

You can use DOM though to get the links of stylesheet, JS file and other links. and make separate request to those web resource.What you are asking is like proxy. Absolute links will work any way. You need to take care of relative links.

The problem is that the links are going to send the user back to the original site, unless you convert all the links into links to a PHP page that loads the HTML content as well. Overall it's really complicated and iframes are there for a reason.

 

Though I can't think of a reason you would want to show another website inside yours.

Link to comment
Share on other sites

The problem is that the links are going to send the user back to the original site, unless you convert all the links into links to a PHP page that loads the HTML content as well. Overall it's really complicated and iframes are there for a reason.

 

yes, exactly so. the links can be pass thorugh a php page from his server. like passing the page link as parameter and that page will handle the request making process. It is the only problem with anchors,forms etc. but links to stylesheet and JS page can be handled directly without calling it from server (unless it needs to be proxied too). But those links need to be figured out of their actual URL by its relative URL to point correct location.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...