Hi Rob, Adrian and Michael, Many thanks for your help on this and for not giving up un this newbie ;-) I didn't realise about the other info that was needed, so here goes: Both domains are mine. Both domains are on the same server. They are in separate accounts. If there's any other info you need please let me know. Chris. > -----Original Message----- > From: php-objects@xxxxxxxxxxxxxxx > [mailto:php-objects@xxxxxxxxxxxxxxx] On Behalf Of DF Yeah > Sent: Tuesday, April 11, 2006 3:19 AM > To: php-objects@xxxxxxxxxxxxxxx > Subject: Re: Is it possible for part of a page > to be a php include ? > > The following method is possible only if both the domains are > in the same server and in the same hosting account by using > absolute include path. > > However, if both domains are in different server, different > hosting account, there are a few approach. > > -------------------------------------------------- ------------ > ------------------------- > > Suggestion 1: > > At www.going-from-domain.com > > <?php // part1.php > > echo "1st section of html code"; > > include part2.php > > echo "3rd section of html code"; > > ?> > > <php //part2.php > > echo "2nd section of html code"; > > ?> > > At www.going-to-domain.com > > <?php // index.php > > echo "normal html code"; > > include "http://www.going-from-domain.com/part2.php"; // only > output result of part2.php will appear > > echo "continue normal html code"; > > ?> > > -------------------------------------------------- ------------ > ------------------------- > > Suggestion 2: > > At www.going-from-domain.com, output your html result with > unique separator, > > eg. at index.php > <html><body> > <table><tr><td>table 1</td></tr></table> > <!-- very unique separator --> > <table><tr><td>table 2</td></tr></table> > <!-- very unique separator --> > <table><tr><td>table 3</td></tr></table> > </body></html> > > - at www.going-to-domain.com, read in > http://www.going-from-domain.com/index.php output as a string. > - explode it with the unique separator. > - select the respective array index of it to get the content. > > -------------------------------------------------- ------------ > ------------------------- > > Please take note, as long as both domains are different, you > are not able to access the server-side variables and function. > > If you are doing it in the same domain, or different domain > but in the same hosting account, you can use the following > method as suggested robert. > > > > > > ----- Original Message ---- > From: "Atkinson, Robert" <ratkinson@xxxxxxxxxxxxx> > To: php-objects@xxxxxxxxxxxxxxx > Sent: Monday, April 10, 2006 10:50:23 PM > Subject: RE: Is it possible for part of a page > to be a php include ? > > First, wrap each section with PHP, like this :- > > comingfrom.php > -------------------------------------------------- ---- > > <?php > function ShowSection1() { > ?> > > <html> > <head> > <meta http-equiv="Content-Language" content="en-gb"> > <meta name="description" content="Test"> > <link rel="stylesheet" type="text/css" > href="http://www.130605.com/styles.css"> > </head> > <body> > <table border="1"> > <tr> > <td> </td> > <td> </td> > <td> </td> > </tr> > <tr> > <td> </td> > <td> </td> > <td> </td> > </tr> > <tr> > <td> </td> > <td> </td> > <td> </td> > </tr> > </table> > } > > <?php > function ShowSection2() { > ?> > > <table border="1"> > <tr> > <td>This is the table to include in the other page - just > this table</td> > <td>saas</td> > <td>asas</td> > </tr> > <tr> > <td>asasasas</td> > <td>asas</td> > <td>asas</td> > </tr> > <tr> > <td>asasasas</td> > <td>saas</td> > <td>asas</td> > </tr> > </table> > } > > <?php > function ShowSection3() { > ?> > > <table border="1"> > <tr> > <td> </td> > <td> </td> > <td> </td> > </tr> > <tr> > <td> </td> > <td> </td> > <td> </td> > </tr> > <tr> > <td> </td> > <td> </td> > <td> </td> > </tr> > </table> > <table border="1"> > <tr> > <td> </td> > <td> </td> > <td> </td> > </tr> > <tr> > <td> </td> > <td> </td> > <td> </td> > </tr> > <tr> > <td> </td> > <td> </td> > <td> </td> > </tr> > </table> > </body> > </html> > > <? > } > ?> > -------------------------------------------------- ---- > > Then, call in the whole file, like this, then the section > you want to use :- > > goingto.php > -------------------------------------------------- ---- > > <html> > <head> > <meta http-equiv="Content-Language" content="en-gb"> > <meta name="description" content="Test"> > <link rel="stylesheet" type="text/css" > href="http://www.011005.com/styles.css"> > </head> > > <?php > require("comingfrom.php"); > ?> > ......... > <p>This is where the table from the other page should go</p> > > <?php > ShowSection2(); > ?> > <table> > ........ > -------------------------------------------------- ---- > > Clear? > > Rob. > ________________________________ > > From: php-objects@xxxxxxxxxxxxxxx > [mailto:php-objects@xxxxxxxxxxxxxxx] On > Behalf Of Chris > Sent: 10 April 2006 15:33 > To: php-objects@xxxxxxxxxxxxxxx > Subject: RE: Is it possible for part of a page > to be a php > include ? > > > Many, many thanks to all here who have tried to > help me on this, it's all been appreciated. > > Despite the kind efforts from the members here, I > seem to be getting stuck on how to start - so for > example, on the pages below, what would I do first > please? > > http://www.130605.com/comingfrom > > http://www.011005.com/goingto > > Any help appreciated. > > Chris. > > > -----Original Message----- > > From: php-objects@xxxxxxxxxxxxxxx > > [mailto:php-objects@xxxxxxxxxxxxxxx] On Behalf > Of Adrianyong > > Sent: Wednesday, April 05, 2006 10:02 PM > > To: php-objects@xxxxxxxxxxxxxxx > > Subject: Re: Is it possible for > part of a page > > to be a php include ? > > > > <?php > > > > function Speak($emotion) > > { > > > > if( $emotion == "Frustrated" ) > > { > > echo "<table witdh =\ "100% \ "><tr><td > align=\ "center\ "> > > I can't believe I'm staying 3am trying to learn > a subject > > called wireless communication. trying to draw a > bloody wave > > form..for differential phase shift keying based > on the > > parameters of carrier frequency 2hertz, > amplitude 5v and 4 > > bauds per second, while answering this email. So > I'm multitasking. > > </td></tr></table> > > "; > > } > > else > > { echo ".... "; } > > > > } > > > > Speak( "Frustrated"); > > <!-- This calls the function to what it suppose > to do, and > > "Frustrated" is the string -type value inserted. > It will > > display a table as well as my emotions. --> > > > > > > ?> > > > > Take care, > > Adrianyong > > > > P.S need anymore examples..? > > Adrianyong <h_tere2000@xxxxxxxxx> wrote: > > file from: anotherexamplewebsite-b/tables.php > > code inside: > > <table> > > <tr><td>123 </td></tr> > > <tr><td>123 </td></tr> > > <tr><td>123 </td></tr> > > </table> > > > > file from: anotherexamplewebsite-b/page1.php > > code inside: > > <html> > > . > > <body> > > <?php include "tables.php"; ?> > > </body> > > . > > </html> > > > > Jay H Edson <jay@xxxxxxxxxxxx> wrote: Make > your include > > files more granular (possibly nesting > them)and/or use > > functions. > > --je > > > > Chris wrote: > > > Many thanks for the input on this to Brian > and > > > Robert - it's definitely appreciated. > > > > > > I don't understand functions, and I > apologise now > > > if I sound a tad slow on this, but I've only > been > > > using a php a few weeks ;-( > > > > > > For example: > > > > > > The page that the php include is to *go > into* is > > > examplewebsite-a/page1 > > > > > > One of the tables on > > > anotherexamplewebsite-b/tables is the table > to go > > > into the above page. > > > > > > On both pages, there's quite a few tables > and all > > > html with no php codes anywhere. > > > > > > How do I tell examplewebsite-a/page1 which > table > > > on examplewebsite-b/tables to include > please? > > > > > > Any help appreciated. > > > > > > Chris > > > > PHP Data object relational mapping generator http://www.metastorage.net/ Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/php-objects/ <*> To unsubscribe from this group, send an email to: php-objects-unsubscribe@xxxxxxxxxxxxxxx <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/