Forum Moderators: coopster
If the backend is different still you can find ways of reusing the content, but this will require additional programming and not just include.
Hope I understood your question correctly.
my first website is a music website with music content and photos of musiciens i wanna use just the latest musics i added there i dont wanna get my other website header or footer i just want some clip from center of it if you want i can pm you he addresses :D
This is what I do:
On site 1, I have an include file (lets say common.asp) with the information that will be used in both sites.
Then I create a page on site 1 and include in it common.asp, plus anything else I want.
One site 2, I create a page and use ASPtear to get the information from common.asp
Works like a charm.
ADDED:
Oops, just noticed this is the PHP forum.
Anyway, I will leave the above info, it might be helpful.
For example, say you have a page:
"domain1.com/eric_clapton.html"
<html> <head><title>Eric Clapton</title></head> <body> <h1>Eric Clapton</h1> Eric Clapton has played guitar for a looong time ... </body> </html> Now you want "domain2.net/e_clapton.php" using stuff from the original page ... but you've got a complete original page with the title tag and everything.
It could be as simple as:
"domain2.net/e_clapton.php"
<?php include "http://domain1.com/eric_clapton.html"; ?> but that would give you two identical pages.
Depending on how big the original site is, it might be a good time to restructure it so you can include stuff easily on another site, like defanjos does in ASP. You need to separate the content from the page structure code, either by physically separating it:
<?php $thispage="eric_clapton"; ?> <html> <head><title><?php include $thispage."_title.html";?></title></head> <body> <?php include $thispage.".html"; ?> </body> </html> That's your template ... have different "_title.html" pages that just hold the title, and different ".html" pages that hold the page content for each musician.
Then on your new domain, just include the content, as above, wherever you want it in your new code.
It's much tougher without having separate content, but you could do it. The above method of separating the content out in advance will pay off in the long run.