0

hi,

is it possible for me to embed part of my site into another?

i want to give someone a piece of php code maybe a page of code which will embed my whole intranet site into theirs so it looks like they are still on the other persons site even though i am hosting the intranet?

is it php or jave script or what is best?

thanks again for your help,

4
Contributors
4
Replies
5
Views
5 Years
Discussion Span
Last Post by diafol
0

thanks i will give that a go. does the css from my site display the content in the iframe no problem? is iframes the best solution then?

thanks

0

An iframe is a webpage inside a webpage.

The web browser will interpret the content in the iframe like it would if you went to the actual page.

0

There are a number of ways to do it.

You can capture the info via CURL, file_get_contents() - if your server allows it. The problem with iframe is that you need to set the size of the iframe - the containing page has no idea about the size of the content so cannot resize dynamically, so you may find that the 'embedded' content is cut off or has load of whitespace.

One benefit of iframe is that the 'embedded' data retains the layout/styling of the original page. Some other techniques won't do this, especially if css references are relative, e.g. 'css/main.css' as opposed to full url: 'http://www.example.com/css/main.css'. This may also apply to src attributes, eg images.

The benefit of some of the others is that you can trim the content to your requirements - preg and strpos functions are useful for this.

Edited by diafol: n/a

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.