How to include the same table in multiple sites ?

Discussion in 'HTML & Website Design' started by papa mia, Mar 29, 2011.

  1. #1
    Hello

    I have 9 websites. I want to include an html table in every footer of those 9 sites. The table code is in a file located on another site (not one of the 9 sites).
    All sites are php.

    I want this so that I can modify the table from one file instead of having to modify it 9 times.

    Is that possible ? And how can I do it ?

     
    papa mia, Mar 29, 2011 IP
  2. frogjy

    frogjy Well-Known Member

    Messages:
    394
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    103
    #2
    using php?

    why not get it from a database. so you can just modify the data, table will change in all 9 sites
     
    frogjy, Mar 30, 2011 IP
  3. papa mia

    papa mia Active Member

    Messages:
    89
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    78
    #3
    I have put the table code in a file called textlinks.inc

    Then I used the function:

    <?php include("textlinks.inc"); ?>

    in every site's footer.

    But it doesn't seem to work

    ??
     
    papa mia, Mar 30, 2011 IP
  4. Sepehr

    Sepehr Peon

    Messages:
    568
    Likes Received:
    14
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Why don't you use an iframe?

    if you insist on using php you might want to try something like the following to get the content and show it on any page:
    
    <?php
    $table= file_get_contents('http://www.example.com/file.xxx');
    echo $table;
    ?> 
    
    PHP:
     
    Sepehr, Apr 1, 2011 IP