...

View Full Version : How to Combine Multiple HTML Page together?



dealmaker
05-09-2008, 07:30 PM
Hi,
My php code executes a shell command that output a html file. I want to combine this file with my website's html file. The reason is that I don't want to use iframe because I am using adsense. How do I do it?
Thanks.

boeing747fp
05-09-2008, 07:44 PM
do file_get_contents() (http://php.net/file_get_contents) or fread() (http://php.net/fread)

aedrin
05-09-2008, 08:23 PM
Except that then you will have duplicate HTML/BODY tags.

You could try using a regular expression to grab everything between <body> and </body>, but depending on the HTML style that might not work (if it includes CSS, etc.)

dealmaker
05-14-2008, 01:21 AM
I did exactly that, but now the format inside the inner html is all mess up. Is there a way to make it not to mess up?
Thank you.


Except that then you will have duplicate HTML/BODY tags.

You could try using a regular expression to grab everything between <body> and </body>, but depending on the HTML style that might not work (if it includes CSS, etc.)



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum